Set a version number containing the build date
On Endless OS we set a version number in two places:
- In the commit metadata, using the key OSTREE_COMMIT_META_KEY_VERSION. This is shown in the output of
ostree admin status
- In
/usr/lib/os-release
, as the fieldsVERSION
&BUILD_ID
. If you go and read theos-release
spec, this is actually wrong, andIMAGE_VERSION
should be used instead. But we've done it this way for nearly a decade, andBUILD_ID
has the nice property that it is actually shown in GNOME Settings' About page already.😄
The commit metadata version takes one of 3 forms:
- Nightly builds: 5.0.2~230301-230009 (that's a yymmdd-hhmmss UTC timestamp)
- Betas: 5.0.2~beta1
- Stable releases: 5.0.2
In this example, VERSION
is always 5.0.2
, and BUILD_ID
is always the build timestamp. IMO it would be useful for GNOME OS to set the same/similar keys, to identify a specific build. It's easier to talk about a specific build of the OS if it is shown in Settings' About page and in ostree admin status
.
Edited by Will Thompson