How To Rename OpenWrt Version?

I compile my own firmware a lot and I always GitHub tags to select the version of OpenWrt I want. Once my firmware has finished compiling and I go to web-GUI I always see Powered by LuCI Master / OpenWrt SNAPSHOT...

I would like to customise the OpenWrt version so that I can set it to v19.07.3. How can I achieve this please?

You checkout the v19.07.3 tag and build from it.
19.07.3 is a fixed point in history of the 19.07 branch. You should not set any arbitrary firmware's version to 19.07.3 (especially if you compile it from master, and not from the 19.07 branch)

If you checkout and compile from the 19.07 branch HEAD, the version will automatically say 19.07-SNAPSHOT. Like this from /etc/banner:

 OpenWrt 19.07-SNAPSHOT, r11086-ab7e9754df

And if you compile from master, you should not try to claim version as 19.07, as master has a different code base than 19.07

1 Like

I use the command git checkout v19.07.3 but the web-GUI always shows SNAPSHOT as shown in the screenshots.

Is there follow up command I should be executing afterwards?

Your snapshot shows "r13209-...." which does not even exist in 19.07.
To me it looks like you are building from master.
Something wrong with your git?

perus@ub2004:/Openwrt/koe$ git clone
Cloning into 'openwrt'...
perus@ub2004:/Openwrt/koe$ cd openwrt/
perus@ub2004:/Openwrt/koe/openwrt$ git fetch --tags
perus@ub2004:/Openwrt/koe/openwrt$ git checkout v19.07.3
Note: switching to 'v19.07.3'.

You are in 'detached HEAD' state. You can look around, make experimental
HEAD is now at f3f38f40da OpenWrt v19.07.3: adjust config defaults

perus@ub2004:/Openwrt/koe/openwrt$ git log --oneline | head -n 3
f3f38f40da OpenWrt v19.07.3: adjust config defaults
85e04e9f46 generic: platform/mikrotik: fix LZOR support
4cd9ae41c5 libjson-c: backport security fixes

Pretty sure that if I would compile from there, I would get 19.07.3 as the version (as the last commit is the one setting the fixed release version and adjusting all other things).

Likely you should not try to build from v19.07.3, as there are already fixes in 19.07 since then. Building your own firmware from the HEAD of 19.07 is usually a better option.

Despite that, here is a link for you

After changing directory into the downloaded git repository, instead of running git fetch --tags I was running git tag to list all of the tags and then running git checkout v19.07.3 as normal. How crucial is the git fetch --tags command?