chore: embed version, git hash, and build date in binary #6

Merged
nrupard merged 1 commit from chore/version-info into main 2026-05-07 18:49:10 +02:00
Member
  • Add build.rs that emits EYES_GIT_HASH and EYES_BUILD_DATE rustc env vars. Reads from same-named build env vars first (used by container/CI builds where .git is absent), falling back to git rev-parse and date -u when present.
  • Wire a LONG_VERSION const into clap's root command (CARGO_PKG_VERSION + hash + date) and set propagate_version = true so every subcommand (image, pdf, video, noteshrink) prints the same version string.
  • Update oci-build/Dockerfile to copy build.rs and accept EYES_GIT_HASH / EYES_BUILD_DATE as ARG/ENV so the embedded metadata survives the container build (which lacks .git and date in the dependency-only stage timing).
  • Update the Forgejo workflow to compute git_hash and build_date once and pass them as --build-arg to both the image push and the binary export buildx invocations, keeping the value identical across artifacts of a single CI run. Also added build.rs to the path triggers.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

- Add build.rs that emits EYES_GIT_HASH and EYES_BUILD_DATE rustc env vars. Reads from same-named build env vars first (used by container/CI builds where .git is absent), falling back to `git rev-parse` and `date -u` when present. - Wire a LONG_VERSION const into clap's root command (CARGO_PKG_VERSION + hash + date) and set propagate_version = true so every subcommand (image, pdf, video, noteshrink) prints the same version string. - Update oci-build/Dockerfile to copy build.rs and accept EYES_GIT_HASH / EYES_BUILD_DATE as ARG/ENV so the embedded metadata survives the container build (which lacks .git and `date` in the dependency-only stage timing). - Update the Forgejo workflow to compute git_hash and build_date once and pass them as --build-arg to both the image push and the binary export buildx invocations, keeping the value identical across artifacts of a single CI run. Also added build.rs to the path triggers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore: embed version, git hash, and build date in binary
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
5db96d9e4b
- Add build.rs that emits EYES_GIT_HASH and EYES_BUILD_DATE rustc env vars. Reads from same-named build env vars first (used by container/CI builds where .git is absent), falling back to `git rev-parse` and `date -u` when present.
- Wire a LONG_VERSION const into clap's root command (CARGO_PKG_VERSION + hash + date) and set propagate_version = true so every subcommand (image, pdf, video, noteshrink) prints the same version string.
- Update oci-build/Dockerfile to copy build.rs and accept EYES_GIT_HASH / EYES_BUILD_DATE as ARG/ENV so the embedded metadata survives the container build (which lacks .git and `date` in the dependency-only stage timing).
- Update the Forgejo workflow to compute git_hash and build_date once and pass them as --build-arg to both the image push and the binary export buildx invocations, keeping the value identical across artifacts of a single CI run. Also added build.rs to the path triggers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nrupard deleted branch chore/version-info 2026-05-07 18:49: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/monkey!6
No description provided.