Skip to content

Read release version from VERSION#915

Open
Symmetricity wants to merge 1 commit into
systemed:masterfrom
Symmetricity:release/version-metadata
Open

Read release version from VERSION#915
Symmetricity wants to merge 1 commit into
systemed:masterfrom
Symmetricity:release/version-metadata

Conversation

@Symmetricity
Copy link
Copy Markdown
Contributor

@Symmetricity Symmetricity commented Jun 5, 2026

AI-generated PR.

Summary

Use a checked-in VERSION file 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 describe at build time. CI now treats
VERSION changes as runtime-impacting and validates that the file uses X.Y.Z
format.

Docker CI builds pass the same VERSION value into the Dockerfile so the final
image 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+nogit fallback.

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> or
v3.1.0+g<commit>.dirty. Clean exact builds from the matching release tag keep
the v3.1.0 form. Builds where Git metadata is unavailable use
v3.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.yml
  • git diff --check origin/master..HEAD
  • CMake configure and build of tilemaker
  • tilemaker --help reports a Git commit suffix for a non-tag Git checkout
  • Building from a source tree without .git reports v3.1.0+nogit

@Symmetricity
Copy link
Copy Markdown
Contributor Author

Symmetricity commented Jun 5, 2026

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.

@Symmetricity Symmetricity force-pushed the release/version-metadata branch 3 times, most recently from 334cfa7 to cb8ce84 Compare June 5, 2026 06:40
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>
@Symmetricity Symmetricity force-pushed the release/version-metadata branch from cb8ce84 to e15f658 Compare June 5, 2026 06:47
@Symmetricity
Copy link
Copy Markdown
Contributor Author

You can see an example of the end state here: https://github.com/Symmetricity/tilemaker/releases/tag/v3.1.0

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.

1 participant