Skip to content

Take the version from the nearest git tag - #23

Merged
cboulay merged 2 commits into
masterfrom
version-from-git-tag
Nov 26, 2026
Merged

cboulay merged 2 commits into
masterfrom
version-from-git-tag

Conversation

@cboulay

@cboulay cboulay commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

CMakeLists.txt hard-coded VERSION 0.2.0, but releases are tagged v1.17.x, so packages were named AudioCapture-0.2.0-.... This PR takes the version from the nearest git tag, the same way App-MeasurementComputing does.

  • cmake/ProjectVersion.cmake (adapted from App-MeasurementComputing): turns the nearest v* or numeric tag into two values.
    • The numeric MAJOR.MINOR.PATCH, used for project() and the macOS bundle version.
    • The full version, which keeps any prerelease suffix, used for the CPack version and the package file name.
    • Without git or tags (release tarballs, exported trees) it falls back to 1.17.2. -DAUDIOCAPTURE_VERSION_OVERRIDE=... forces a version.
  • CI: the build job checks out with fetch-depth: 0 so the tags are present.
  • macOS signing job: it now reads the version from the package's folder name, as App-MeasurementComputing does. It used to grep project(... VERSION x.y.z) out of CMakeLists.txt, which no longer works once the version is a variable.

Configured locally:

Case project version package
tag v1.17.2 1.17.2 AudioCapture-1.17.2-macOS_arm64
-DAUDIOCAPTURE_VERSION_OVERRIDE=v1.18.0b1 1.18.0 AudioCapture-1.18.0b1-macOS_arm64
no .git 1.17.2 (fallback) AudioCapture-1.17.2-macOS_arm64

Same approach as App-MeasurementComputing: cmake/ProjectVersion.cmake turns the nearest tag (v1.17.2,
v1.18.0b1, ...) into the numeric project() version and the full version for package names. Falls back
to 1.17.2 without git or tags; AUDIOCAPTURE_VERSION_OVERRIDE forces a version. The project said 0.2.0
while releases are tagged 1.17.x. CI fetches tags, and the macOS signing job reads the version from
the package name instead of grepping CMakeLists.txt.
@cboulay
cboulay merged commit 3fd513b into master Nov 26, 2026
5 checks passed
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