Skip to content

Commit 0af3c33

Browse files
committed
fix(release): embed version in artifacts
1 parent c15727e commit 0af3c33

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.goreleaser.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ builds:
99
- id: gog
1010
main: ./cmd/gog
1111
binary: gog
12+
ldflags: >-
13+
-s -w
14+
-X github.com/steipete/gogcli/internal/cmd.version={{ .Tag }}
15+
-X github.com/steipete/gogcli/internal/cmd.commit={{ .ShortCommit }}
16+
-X github.com/steipete/gogcli/internal/cmd.date={{ .Date }}
1217
env:
1318
- CGO_ENABLED=0
1419
targets:
@@ -19,6 +24,11 @@ builds:
1924
- id: gog_darwin
2025
main: ./cmd/gog
2126
binary: gog
27+
ldflags: >-
28+
-s -w
29+
-X github.com/steipete/gogcli/internal/cmd.version={{ .Tag }}
30+
-X github.com/steipete/gogcli/internal/cmd.commit={{ .ShortCommit }}
31+
-X github.com/steipete/gogcli/internal/cmd.date={{ .Date }}
2232
env:
2333
- CGO_ENABLED=1
2434
targets:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.5.2 - 2026-01-10
4+
5+
### Fixed
6+
7+
- Release builds: embed version/commit/date so `gog --version` is correct (Homebrew/tap installs too).
8+
39
## 0.5.1 - 2026-01-09
410

511
### Added

0 commit comments

Comments
 (0)