feat: Derive baked-in version from git tag instead of hardcoding#74
Merged
Conversation
- Telemetry app_version and `flapi --version` were always "0.3.0" (the hardcoded project() version), while real releases use CalVer tags (v26.06.11). The tag only flowed into the wheel name, never the binary. - CMakeLists.txt now resolves FLAPI_VERSION in priority order: 1. -DFLAPI_VERSION_OVERRIDE (CI sets this from the git tag) 2. `git describe --tags --dirty` (meaningful local dev versions) 3. "latest" (fallback: source tarball / no git) A leading "v" is stripped so the binary reports clean semver. - Makefile: forward $(CMAKE_EXTRA_FLAGS) on the macOS release-x86_64 / release-arm64 targets (release already forwarded it). - build.yaml: on tag pushes, inject -DFLAPI_VERSION_OVERRIDE from github.ref_name across Windows, Linux (docker -e), and macOS builds.
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.
Summary
app_version(andflapi --version) always reported0.3.0— the hardcodedproject()version — while real releases use CalVer tags (e.g.v26.06.11). The tag only flowed into the PyPI wheel name, never into the binary.FLAPI_VERSIONfrom the git tag, with sensible fallbacks; CI injects the tag on release builds.Changes
FLAPI_VERSIONin priority order — (1)-DFLAPI_VERSION_OVERRIDE(CI from tag), (2)git describe --tags --dirty(local dev), (3)"latest"(source tarball / no git). Leadingvstripped → clean semver.$(CMAKE_EXTRA_FLAGS)on the macOSrelease-x86_64/release-arm64targets (the genericreleasetarget already did).v*tag pushes, inject-DFLAPI_VERSION_OVERRIDE=${{ github.ref_name }}across Windows, Linux (viadocker run -e), and macOS builds.Test plan
cmake -P(override →0.4.0, no-override →26.06.11-dirty, empty override → falls back).app_versionmatches the tag.🤖 Generated with Claude Code