Commit 4b5f2b7
feat(cmd): add --version, wired to the release tag via ldflags (#49)
`--version` errored with `unknown flag` — the binary had no build-time
version to print. Set cobra's rootCmd.Version (which registers
--version/-v for free) from a package var, injected at release time via
goreleaser ldflags. Dev builds report "dev".
Matches the pattern shipped in withings-export-cli#44.
New minor flag, no behavior change to any existing command.
Claude-Session: https://claude.ai/code/session_012MvqxTC64Z9EEDewCUbNNo
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2089d63 commit 4b5f2b7
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | | - | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
0 commit comments