Closed jhult closed 5 months ago
This relates to https://github.com/Granola-Team/mina-block-explorer/issues/698 and the implementation PR #702:
I was going to suggest adding a build.rs
but you beat me to it. You could use something like the BUILDKITE_COMMIT
env variable to set this value in CI/CD
For consistency, please use the output of 'git rev-parse --short=8 HEAD', run at build time.
For simplicity sake (and simplest solution to the problem), I fixed the CLI version command to include the git commit hash. If we really want to add an API, it should be another issue.
Add a REST endpoint (e.g.
/version
or/about
) that provides the git commit ('git rev-parse --short=8 HEAD
) this Indexer instance was built against.Note that the
--version
for the CLI returnsmina-indexer 0.1.1
(due to this inCargo.toml
). We want the version (CLI command) to be the git commit (or perhaps something like Calendar Versioning).