Skip to content

Add --version - #1

Merged
andrew merged 1 commit into
mainfrom
add-version
Sep 16, 2026
Merged

andrew merged 1 commit into
mainfrom
add-version

Conversation

@andrew

@andrew andrew commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Wire a Version var into the root cobra command so git-spdx --version works, set it via -ldflags -X main.Version in goreleaser for release builds, and fall back to debug.ReadBuildInfo().Main.Version for go install builds.

Wire a Version var into the root cobra command, set it via -ldflags
in goreleaser, and fall back to debug.BuildInfo.Main.Version for
go install builds.
@andrew
andrew merged commit 676fec3 into main Sep 16, 2026
7 checks passed
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.

1 participant