specverb-gen: generated binaries should report a --version #148
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Generated specverb-gen consumer binaries (
ward-kdland friends) expose no--version. The mergedmain.gobuilds acli.Commandwith noVersionfield, so there is no way to ask a built binary which release it is.Why
ward is brewed and its status-line treatment compares the installed binary's
--versionagainst the repo's latest tag to flag staleness. ward-kdl is built by this driver and should get the same treatment, which requires the binary to report a version.Change
main.gonow carriesvar Version = "dev"wired to the root command'sVersion, so urfave/cli auto-registers--version.specverb-gen build --set-version <v>injects the release tag via-ldflags "-X main.Version=".Downstream: ward's formula passes its release tag as
--set-versionwhen building ward-kdl.