Skip to content

refactor: Use versioning in tags consistent with mkosi's internal $IMAGE_VERSION#55

Merged
fizzyizzy05 merged 4 commits into
apollo-linux:mainfrom
Smujb:image-version
Jun 27, 2026
Merged

refactor: Use versioning in tags consistent with mkosi's internal $IMAGE_VERSION#55
fizzyizzy05 merged 4 commits into
apollo-linux:mainfrom
Smujb:image-version

Conversation

@Smujb

@Smujb Smujb commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Switch to an image naming scheme similar to Universal Blue, where images are named YYYYMMDD.V instead of simply YYYYMMDD. The V is a version number for disambiguation and it increments by 1 for every build on the same day.

mkosi.bump has been rewritten in Python to first check the existing mkosi.version and increment it if necessary according to this versioning scheme. Index starts at 0, so the first image built on any given day will be YYYYMMDD.0. This phases out the messy hack that was used before of using YYYYMMDDHHMMSS as the version mkosi.bump would return and then separately versioning the image itself.

Features:

  • /etc/os-release now has the version of the currently booted image under IMAGE_VERSION
  • bootc status will list the version associated with every deployment
  • All of this versioning is consistent with the tags on Github, so users know exactly which image they are on
  • Every build that succeeds, CI or local, will have a new version ID. This will be the case even when multiple images are built on the same day.

Note: This versioning scheme requires images to already follow it in order to work. So the first image built after merging this will end in .0 even if it was not the first image built on that day.

fixes #54

Smujb added 4 commits June 24, 2026 08:10
Signed-off-by: SmuJB <smujaybdev@protonmail.com>
The internal mkosi naming scheme has been changed from YYYYMMDDHHMMSS to YYYYMMDD.V where the V is an internal version number that increments by 1 each time a new image is built. This is in line with how Universal Blue (in particular Aurora) tags their image versions.

Signed-off-by: SmuJB <smujaybdev@protonmail.com>
Signed-off-by: SmuJB <smujaybdev@protonmail.com>
Signed-off-by: SmuJB <smujaybdev@protonmail.com>
@fizzyizzy05 fizzyizzy05 merged commit 50780a9 into apollo-linux:main Jun 27, 2026
4 checks passed
@Smujb Smujb deleted the image-version branch June 27, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider using the same internal "version" mkosi tags the build with to tag pushed images

2 participants