File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ jobs:
104104
105105 for ARCH in amd64 386 arm arm64; do
106106 GOOS=linux GOARCH=$ARCH CGO_ENABLED=0 go build \
107- -ldflags="-s -w" -o vt ./cmd/vt/main.go
107+ -ldflags="-s -w -X 'github.com/happyhackingspace/vt/internal/banner.AppVersion=${GITHUB_REF_NAME}' " -o vt ./cmd/vt/main.go
108108 zip "vt_${VERSION}_linux_${ARCH}.zip" vt
109109 rm vt
110110 done
@@ -140,7 +140,7 @@ jobs:
140140
141141 for ARCH in amd64 386 arm64; do
142142 GOOS=windows GOARCH=$ARCH CGO_ENABLED=0 go build \
143- -ldflags="-s -w" -o vt.exe ./cmd/vt/main.go
143+ -ldflags="-s -w -X 'github.com/happyhackingspace/vt/internal/banner.AppVersion=${GITHUB_REF_NAME}' " -o vt.exe ./cmd/vt/main.go
144144 zip "vt_${VERSION}_windows_${ARCH}.zip" vt.exe
145145 rm vt.exe
146146 done
@@ -176,7 +176,7 @@ jobs:
176176
177177 for ARCH in amd64 arm64; do
178178 CGO_ENABLED=1 GOOS=darwin GOARCH=$ARCH go build \
179- -ldflags="-s -w" -o vt ./cmd/vt/main.go
179+ -ldflags="-s -w -X 'github.com/happyhackingspace/vt/internal/banner.AppVersion=${GITHUB_REF_NAME}' " -o vt ./cmd/vt/main.go
180180 zip "vt_${VERSION}_macOS_${ARCH}.zip" vt
181181 rm vt
182182 done
Original file line number Diff line number Diff line change @@ -15,12 +15,11 @@ import (
1515 "golang.org/x/term"
1616)
1717
18- const (
19- // AppName is the application name.
20- AppName = "vt"
21- // AppVersion is the application version.
22- AppVersion = "v0.0.1"
23- )
18+ // AppName is the application name.
19+ const AppName = "vt"
20+
21+ // AppVersion is the application version, injected at build time via -ldflags.
22+ var AppVersion = "dev"
2423
2524// DANGER (#FF3355) base RGB — matching JS DANGER_RGB.
2625const (
You can’t perform that action at this time.
0 commit comments