Read release version from VERSION#915
Open
Symmetricity wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
This PR is part 1 of a series of 4 PRs focused on CI and release workflows. Each PR stacks on top of the previous, so I'll submit them one at a time. The end state is a repeatable 'release' workflow that builds and publishes compiled release zips/deb files. Can be triggered manually by the maintainer or will automatically trigger when git tag with vX.Y.Z is added. |
334cfa7 to
cb8ce84
Compare
Use a checked-in VERSION file as the single release version source for CMake, Makefile builds, Docker builds, and Docker image labels. This avoids relying on tag lookup for release package builds, gives CI a stable version value to validate, and still keeps Git checkout builds traceable by appending the current commit when the source is not exactly a clean matching release tag. Clean exact builds from the matching release tag keep the clean release version. Dirty tag checkouts, non-tag builds, and other local Git builds include the commit suffix. Builds without readable Git metadata use a +nogit suffix so source-tarball builds are distinguishable from release-tag builds. Docker CI builds pass VERSION as TILEMAKER_VERSION for the image label and pass the computed build version as TILEMAKER_BUILD_VERSION so the executable inside CI-built images remains traceable. Docker builds without that optional build-version argument still fall back to the in-container CMake version logic. Co-authored-by: Codex <noreply@openai.com>
cb8ce84 to
e15f658
Compare
Contributor
Author
|
You can see an example of the end state here: https://github.com/Symmetricity/tilemaker/releases/tag/v3.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-generated PR.
Summary
Use a checked-in
VERSIONfile as tilemaker's release version source.This updates CMake, Makefile builds, and Docker builds to read the same version
value instead of relying on
git describeat build time. CI now treatsVERSIONchanges as runtime-impacting and validates that the file usesX.Y.Zformat.
Docker CI builds pass the same
VERSIONvalue into the Dockerfile so the finalimage label is no longer stale or left as an unknown placeholder. They also
pass the Git-aware build version into CMake so the executable inside CI-built
Docker images remains traceable. Docker builds that do not pass that
build-version argument still compile with CMake's
v3.1.0+nogitfallback.For builds from a Git checkout, non-release-tag builds append commit metadata to
the displayed tilemaker version, for example
v3.1.0+g<commit>orv3.1.0+g<commit>.dirty. Clean exact builds from the matching release tag keepthe
v3.1.0form. Builds where Git metadata is unavailable usev3.1.0+nogit.Rationale
Release and package builds should not depend on tag lookup being available in a
particular checkout or build context. A single version file gives CMake,
Makefile, Docker, and release automation the same source of truth and makes
version bumps easier to review.
The optional Git suffix keeps development, CI, and custom-built binaries
traceable without requiring Git at runtime or changing release artifact version
strings.
Testing
actionlint .github/workflows/ci.ymlgit diff --check origin/master..HEADtilemakertilemaker --helpreports a Git commit suffix for a non-tag Git checkout.gitreportsv3.1.0+nogit