Skip to content

feat: include Git revision in version output - #201

Closed
rsheyd wants to merge 1 commit into
romaintb:mainfrom
rsheyd:agent/git-version-metadata
Closed

feat: include Git revision in version output#201
rsheyd wants to merge 1 commit into
romaintb:mainfrom
rsheyd:agent/git-version-metadata

Conversation

@rsheyd

@rsheyd rsheyd commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What changed

  • include the short Git revision in terminalist --version for builds made from a Git checkout;
  • append dirty when tracked working-tree changes were present at build time;
  • keep the ordinary package-version output when Git metadata is unavailable, such as packaged builds;
  • document how contributors can install and identify a local development build.

Why

Local development builds currently share the package version, which makes it difficult to tell which checkout produced an installed binary. Including the revision makes bug reports and local testing easier without changing release-version semantics.

The build script watches Git's actual HEAD, index, and current branch-ref paths, as well as src and build.rs, so Cargo refreshes the revision and dirty state after commits and working-tree changes. Resolving the paths through Git also supports linked worktrees.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test
  • clean manual check: terminalist 0.5.0 (5c2312a)

@rsheyd

rsheyd commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

I’m going to close this in favor of #202.

I originally added Git metadata because CONTRIBUTING.md didn’t provide a convention for identifying development builds. After thinking about it more, documenting -dev.N versions addresses the original need more simply, without adding build-script machinery.

@rsheyd rsheyd closed this Jul 31, 2026
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