Show version, git hash, and build date in CLI output #23

Merged
nrupard merged 1 commit from feat/version-info into main 2026-05-07 18:58:09 +02:00
Member

Adds a build.rs that exposes GIT_HASH and BUILD_DATE as compile-time env vars (sourced from the surrounding env when set, otherwise from git rev-parse and date -u). The values are baked into the binary and surfaced via --version/-V, the help banner, and an info log line at startup so support can pin troubleshooting to an exact build.

The Docker build path now accepts GIT_HASH and BUILD_DATE as build args; oci-build/build.nu reads them from the host git checkout and current UTC time and forwards them via --build-arg. The dummy-prebuild stage in the Dockerfile previously left stale fingerprints that caused the final cargo build to skip and ship a stub binary, so sources are now touched before the real build to force the bin target to actually rebuild.

Signed-off-by: nrupard natrsmith11@gmail.com

Adds a build.rs that exposes GIT_HASH and BUILD_DATE as compile-time env vars (sourced from the surrounding env when set, otherwise from `git rev-parse` and `date -u`). The values are baked into the binary and surfaced via `--version`/`-V`, the help banner, and an info log line at startup so support can pin troubleshooting to an exact build. The Docker build path now accepts GIT_HASH and BUILD_DATE as build args; oci-build/build.nu reads them from the host git checkout and current UTC time and forwards them via --build-arg. The dummy-prebuild stage in the Dockerfile previously left stale fingerprints that caused the final cargo build to skip and ship a stub binary, so sources are now touched before the real build to force the bin target to actually rebuild. Signed-off-by: nrupard <natrsmith11@gmail.com>
Show version, git hash, and build date in CLI output
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
25db730040
Adds a build.rs that exposes GIT_HASH and BUILD_DATE as compile-time env vars (sourced from the surrounding env when set, otherwise from `git rev-parse` and `date -u`). The values are baked into the binary and surfaced via `--version`/`-V`, the help banner, and an info log line at startup so support can pin troubleshooting to an exact build.

The Docker build path now accepts GIT_HASH and BUILD_DATE as build args; oci-build/build.nu reads them from the host git checkout and current UTC time and forwards them via --build-arg. The dummy-prebuild stage in the Dockerfile previously left stale fingerprints that caused the final cargo build to skip and ship a stub binary, so sources are now touched before the real build to force the bin target to actually rebuild.

Signed-off-by: nrupard <natrsmith11@gmail.com>
nrupard deleted branch feat/version-info 2026-05-07 18:58:10 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/explorer-bookmarks!23
No description provided.