Skip to content

Drop -dirty suffix; fetch tags on Vercel for clean version display#29

Merged
heyitsStylez merged 3 commits into
mainfrom
version-no-dirty
May 6, 2026
Merged

Drop -dirty suffix; fetch tags on Vercel for clean version display#29
heyitsStylez merged 3 commits into
mainfrom
version-no-dirty

Conversation

@heyitsStylez
Copy link
Copy Markdown
Owner

Summary

The deployed site shows `d30e5b7-dirty` instead of a real tag. Two causes:

  1. Vercel's shallow clone has no tags, so `git describe --tags` falls back to the short SHA.
  2. Something during the Vercel build (likely auto-run `npm install` rewriting `package-lock.json`) mutates a tracked file, triggering `-dirty`.

Fix:

  • Drop `--dirty` from `git describe` in `build.py`. `-dirty` on a CI checkout reflects build-time mutations, not user-visible source state.
  • Prepend `git fetch --tags --depth=1 origin || true` to Vercel's `buildCommand` so tags are visible to `git describe`.

Test plan

  • `python3 -m unittest discover -s test/build` — 5 passing (incl. updated dirty-tree test)
  • `python3 build.py --check` — clean
  • After merge, confirm the deployed footer shows `v0.10.x` (or `v0.10.x-N-g` for commits past the tag), not `-dirty`

🤖 Generated with Claude Code

The deployed site was showing "<sha>-dirty" because Vercel's shallow
clone has no tags (so `git describe --tags` falls back to a SHA) and
something during the Vercel build mutates a tracked file (npm install
auto-runs and rewrites package-lock).

- Remove --dirty from `git describe` in build.py: -dirty on a CI
  checkout reflects build-time mutations, not the source the user is
  looking at — never useful to surface.
- Prepend `git fetch --tags --depth=1 origin || true` to Vercel's
  buildCommand so tags are visible to `git describe`.
- Update test_dirty_tree to assert the suffix is suppressed.
- Update CLAUDE.md file-map note.

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 0:44am

The PRD originally framed -dirty as a "not-from-a-clean-tag" signal, but
on Vercel every build is dirty (npm install rewrites package-lock during
the build), so the signal was noise. This commit aligns the doc with the
behavior change in the rest of this PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@heyitsStylez heyitsStylez merged commit 3fd111a into main May 6, 2026
4 checks passed
@heyitsStylez heyitsStylez deleted the version-no-dirty branch May 6, 2026 00: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.

1 participant