Skip to content

(#28) fix: incorrect version display in Homebrew installation#29

Merged
seunggabi merged 1 commit intomainfrom
fix/#28_version-display-homebrew
Feb 12, 2026
Merged

(#28) fix: incorrect version display in Homebrew installation#29
seunggabi merged 1 commit intomainfrom
fix/#28_version-display-homebrew

Conversation

@seunggabi
Copy link
Copy Markdown
Owner

Problem

Homebrew installation shows incorrect version (v5.0.14 instead of v1.2.0).

Root cause: git describe searches parent directories when .git is absent, finding Homebrew's own git repository.

Solution

✅ Add VERSION file for explicit version tracking
✅ Check .git existence before using git describe
✅ Fallback to VERSION file in Homebrew installations
✅ Inject VERSION file into release tarball

Changes

  • bin/mac-ops: Smart version detection (git or VERSION file)
  • VERSION: Version tracking file (1.2.0)
  • release.yml: Patch tarball to include VERSION file

Testing

# With git (development)
./bin/mac-ops version  # ✅ v1.2.0 from git describe

# Without git (Homebrew simulation)
cd /tmp/test && cp -r {bin,lib,VERSION} . && ./bin/mac-ops version  # ✅ v1.2.0 from VERSION file

Closes #28

🤖 Generated with Claude Code

Fix version detection to work correctly in Homebrew installations:
- Add VERSION file for explicit version tracking
- Modify bin/mac-ops to check .git existence before using git describe
- Fallback to VERSION file when .git is absent (Homebrew install)
- Update release workflow to inject VERSION file into tarball

This prevents git describe from finding parent Homebrew repo (v5.0.14)
and displaying wrong version in Homebrew installations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@seunggabi seunggabi merged commit 3095d17 into main Feb 12, 2026
2 checks passed
@seunggabi seunggabi deleted the fix/#28_version-display-homebrew branch February 12, 2026 04:45
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.

fix: incorrect version display in Homebrew installation

1 participant