Take the version from the git tag - #111
Merged
Merged
Conversation
- 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.
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.
What
The version comes from the git tag. CMake derives DIMS_VERSION from
git describe, or from-DDIMS_VERSIONfor 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 av4.0.0-beta2tag failed the release against a source that still declared4.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-beta2writes#define DIMS_VERSION "4.0.0-beta2"; without it, the fallback is0.0.0-unknown. A checkout build readsgit describe.make -C test testpasses all 271 cases; the status test names whatever version compiled.After this merges, move the
v4.0.0-beta2tag to the merge commit and push it, so the release runs under the new workflow.