Skip to content

Take the version from the git tag - #111

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/version-from-tag
Aug 28, 2026
Merged

Take the version from the git tag#111
beetlebugorg merged 1 commit into
mainfrom
fix/version-from-tag

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

What

The version comes from the git tag. CMake derives DIMS_VERSION from git describe, or from -DDIMS_VERSION for a container build, which excludes .git, the same way DIMS_COMMIT already works. The release workflow passes the tag in as DIMS_VERSION, so the published binary reports the tag it shipped under. The tag-versus-source check is gone, because the tag is now the source.

Why

The version lived in CMakeLists.txt, and a release tag had to match it. The two drifted, and a v4.0.0-beta2 tag failed the release against a source that still declared 4.0.0-beta. With the tag as the source, a tag push is the whole bump, and the binary cannot report a version other than its tag.

Verify

A container build with --build-arg DIMS_VERSION=4.0.0-beta2 writes #define DIMS_VERSION "4.0.0-beta2"; without it, the fallback is 0.0.0-unknown. A checkout build reads git describe. make -C test test passes all 271 cases; the status test names whatever version compiled.

After this merges, move the v4.0.0-beta2 tag to the merge commit and push it, so the release runs under the new workflow.

- Derive DIMS_VERSION from git describe, or from -DDIMS_VERSION for a container
  build, which excludes .git, so a tag push is the whole bump.
- Pass the tag into the release build and drop the tag-versus-source check.
@beetlebugorg
beetlebugorg merged commit f241b5c into main Aug 28, 2026
5 checks passed
@beetlebugorg
beetlebugorg deleted the fix/version-from-tag branch August 28, 2026 22:27
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