Skip to content

cmake: allow explicit version override for tarball builds - #543

Merged
Sapd merged 1 commit into
masterfrom
fix/version-override
Jul 23, 2026
Merged

Sapd merged 1 commit into
masterfrom
fix/version-override

Conversation

@Sapd

@Sapd Sapd commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Release tarballs have no git metadata, so git describe falls back to 0.0.0-unknown — the binary then reports the wrong version in every tarball-based package (Homebrew, the new .deb, and a future .rpm).

This adds a -DHEADSETCONTROL_VERSION=<version> override; git describe is still used when it's not passed (CI, dev builds unchanged).

Verified:

  • -DHEADSETCONTROL_VERSION=9.9.9 → HeadsetControl version: 9.9.9
  • no override (in-repo) → HeadsetControl version: 4.0.0-2-ge09264b (git describe)

Follow-ups this unblocks (future releases):

  • Homebrew formula: drop the inreplace hack, pass -DHEADSETCONTROL_VERSION=#{version}
  • debian/rules: pass it from the changelog version so the .deb binary reports the right version

Building from a release tarball has no git metadata, so `git describe`
fell back to 0.0.0-unknown — the binary reported the wrong version in the
Homebrew, .deb and (future) .rpm packages. Packagers can now pass
-DHEADSETCONTROL_VERSION=<version> to set it; git describe is still used
when no override is given.
@Sapd
Sapd merged commit e55662b into master Jul 23, 2026
5 checks passed
@Sapd
Sapd deleted the fix/version-override branch July 23, 2026 17:28
@claude

claude Bot commented Jul 23, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Sapd added a commit that referenced this pull request Jul 23, 2026
- Resolve .gitattributes (keep both debian/ and headsetcontrol.spec export-ignore)
- debian/rules passes -DHEADSETCONTROL_VERSION so future .deb binaries report
  the real version instead of 0.0.0-unknown (uses #543's CMake override)
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