Skip to content

Resolve version via ls-remote when local tag refs are missing#32

Merged
heyitsStylez merged 1 commit into
mainfrom
version-lsremote-fallback
May 6, 2026
Merged

Resolve version via ls-remote when local tag refs are missing#32
heyitsStylez merged 1 commit into
mainfrom
version-lsremote-fallback

Conversation

@heyitsStylez
Copy link
Copy Markdown
Owner

Summary

  • resolve_version() now tries local git describe --exact-match --tags first, then falls back to git ls-remote --tags origin to find a tag at HEAD, then to git describe --tags --always.
  • Added a regression test that simulates the Vercel failure mode (tag exists on origin but local tag refs are missing).

Why

After PR #31 the deploy hook reliably builds the tagged commit, but the footer still showed a SHA (73bb0dd for v0.10.6). Vercel's shallow clone plus git fetch --tags --depth=1 doesn't reliably connect tag refs to HEAD's commit, so git describe --tags walked off the end and returned the short SHA. ls-remote queries origin directly, so it works regardless of local clone state.

Test plan

  • python3 -m unittest discover -s test/build (6 tests pass).
  • python3 build.py --check clean.
  • After merge, footer + Track Wallet popup show the new vX.Y.Z tag.

🤖 Generated with Claude Code

Vercel's shallow clone + `git fetch --tags --depth=1` doesn't reliably
connect tag refs to HEAD's commit, so even when origin holds a tag that
points exactly at HEAD, `git describe --tags` falls through to the short
SHA — and the footer shows a commit hash instead of vX.Y.Z.

Add an ls-remote fallback to resolve_version(): if local describe can't
find an exact-match tag, ask origin directly. ls-remote works in any
clone state because it's a remote query, not a local walk.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperwheel Ready Ready Preview, Comment May 6, 2026 8:56am

@heyitsStylez heyitsStylez merged commit ad829b3 into main May 6, 2026
4 checks passed
@heyitsStylez heyitsStylez deleted the version-lsremote-fallback branch May 6, 2026 08:57
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