Skip to content

Inject version commit and build tag metadata with Makefile.#276

Open
mynk8 wants to merge 1 commit intomicrocks:masterfrom
mynk8:fix-version-commit-metadata
Open

Inject version commit and build tag metadata with Makefile.#276
mynk8 wants to merge 1 commit intomicrocks:masterfrom
mynk8:fix-version-commit-metadata

Conversation

@mynk8
Copy link
Copy Markdown

@mynk8 mynk8 commented May 4, 2026

Description

This PR uses the existing Makefile build flow to inject version and commit metadata at build time.

For local/source builds, the version is derived from git describe --tags --dirty --always, so unreleased binaries include the nearest tag, commit distance, commit hash, and dirty state when applicable:

Microcks CLI 1.0.2-43-g1dad150-dirty
Commit: 1dad150

In a real release which can be made with the added make build-release, this would use the actual release tag, for example:

Microcks CLI 1.0.3
Commit: <release-commit>

This also wires Cobra's standard --version flag to the same output as microcks version.

Related issue(s)

Fixes #275

@mynk8 mynk8 requested review from Harsh4902, lbroudoux and yada as code owners May 4, 2026 14:22
@mynk8 mynk8 force-pushed the fix-version-commit-metadata branch from 1dad150 to b19d0be Compare May 4, 2026 14:26
Signed-off-by: mynk8 <mr.mayankgame@gmail.com>
@mynk8 mynk8 force-pushed the fix-version-commit-metadata branch from b19d0be to 404860f Compare May 4, 2026 14:28
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.

Expose CLI version and build metadata consistently

1 participant