Skip to content

fix(frontend): resolve sidebar always showing 0.0.0 version - #365

Merged
javi11 merged 1 commit into
mainfrom
fix/sidebar-version-display
Feb 27, 2026
Merged

fix(frontend): resolve sidebar always showing 0.0.0 version#365
javi11 merged 1 commit into
mainfrom
fix/sidebar-version-display

Conversation

@javi11

@javi11 javi11 commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • frontend/vite.config.ts: Added getAppVersion() and getGitCommit() helpers that use Node's execSync as fallback when APP_VERSION/GIT_COMMIT env vars are not set. During bun run dev, the sidebar now shows the actual git-derived version and commit hash instead of 0.0.0 / unknown.
  • Makefile build-frontend: Resolves VERSION and COMMIT via git describe / git rev-parse before the build and passes them as APP_VERSION/GIT_COMMIT, matching the values used by build-cli's ldflags.

Test plan

  • Run cd frontend && bun run dev — sidebar should show git-derived version (e.g. v1.2.3-5-gabcdef) and commit hash
  • Run make build-frontend — values should match Go binary ldflags
  • In a repo without tags, git describe --always still returns a commit hash; sidebar degrades gracefully
  • In a directory without git, values fall back to "0.0.0" / "unknown"

🤖 Generated with Claude Code

- Add execSync-based git fallbacks in vite.config.ts so dev builds
  automatically pick up the real version and commit hash without
  needing env vars pre-set
- Update build-frontend Makefile target to pass APP_VERSION and
  GIT_COMMIT explicitly, keeping frontend and Go binary in sync

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@javi11
javi11 merged commit 1c79954 into main Feb 27, 2026
1 check passed
@javi11
javi11 deleted the fix/sidebar-version-display branch February 27, 2026 08:09
yoshitaka420 pushed a commit to yoshitaka420/altmount that referenced this pull request Jun 1, 2026
…s#365)

- Add execSync-based git fallbacks in vite.config.ts so dev builds
  automatically pick up the real version and commit hash without
  needing env vars pre-set
- Update build-frontend Makefile target to pass APP_VERSION and
  GIT_COMMIT explicitly, keeping frontend and Go binary in sync

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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