chore: derive build version from git tags for all components#305
Merged
johntmyers merged 1 commit intomainfrom Mar 14, 2026
Merged
chore: derive build version from git tags for all components#305johntmyers merged 1 commit intomainfrom
johntmyers merged 1 commit intomainfrom
Conversation
Compute version strings from git describe in openshell-core's build.rs using the guess-next-dev scheme (e.g. 0.0.4-dev.6+g2bf9969). All binary crates and the TUI splash screen now use the shared openshell_core::VERSION constant instead of CARGO_PKG_VERSION. In Docker/CI builds where .git is absent, falls back to CARGO_PKG_VERSION which is already set correctly by the sed-patch pipeline. Also adds OPENSHELL_CARGO_VERSION support to the cluster image and fast-deploy supervisor builds for parity with the gateway.
drew
approved these changes
Mar 14, 2026
drew
pushed a commit
that referenced
this pull request
Mar 16, 2026
Compute version strings from git describe in openshell-core's build.rs using the guess-next-dev scheme (e.g. 0.0.4-dev.6+g2bf9969). All binary crates and the TUI splash screen now use the shared openshell_core::VERSION constant instead of CARGO_PKG_VERSION. In Docker/CI builds where .git is absent, falls back to CARGO_PKG_VERSION which is already set correctly by the sed-patch pipeline. Also adds OPENSHELL_CARGO_VERSION support to the cluster image and fast-deploy supervisor builds for parity with the gateway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All Rust binaries and the TUI splash screen now show the correct git-derived version (e.g.
0.0.4-dev.6+g2bf9969) instead of the hardcoded0.1.0from Cargo.toml.Changes
git_version()toopenshell-core/build.rsthat computes version fromgit describe --tagsusing the guess-next-dev scheme (matching the existingsetuptools-scmrelease pipeline)openshell_core::VERSIONconstant that all components use — falls back toCARGO_PKG_VERSIONwhen.gitis absent (Docker/CI builds)env!("CARGO_PKG_VERSION")references across CLI, server (gRPC health, HTTP readyz, auth page), sandbox, and TUI splash screenOPENSHELL_CARGO_VERSIONsupport todocker-build-cluster.sh,Dockerfile.cluster, andcluster-deploy-fast.shfor supervisor parity with gateway buildsCI Impact
None. In Docker/CI builds where
.gitis excluded (via.dockerignore) andgitis not installed,git_version()returnsNoneand the fallback toCARGO_PKG_VERSION(sed-patched by the existing pipeline) is used. Behavior is identical to before.Testing
mise run pre-commitpassesopenshell --version→openshell 0.0.4-dev.6+g2bf9969openshell-server --version→openshell-server 0.0.4-dev.6+g2bf9969openshell-sandbox --version→openshell-sandbox 0.0.4-dev.6+g2bf9969Checklist