Skip to content

Commit bec4960

Browse files
authored
Merge pull request #21 from koki-develop/embed-version
2 parents 7d9e967 + 9ab8c31 commit bec4960

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.goreleaser.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
builds:
2-
- env:
2+
- ldflags:
3+
- -s -w -X github.com/koki-develop/clive/cmd.version={{.Version}}
4+
env:
35
- CGO_ENABLED=0
46
goos:
57
- linux

cmd/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import (
66
"github.com/spf13/cobra"
77
)
88

9+
var version string
10+
911
var rootCmd = &cobra.Command{
1012
Use: "clive",
11-
Version: "v0.3.0",
13+
Version: version,
1214
Short: "Automates terminal operations and lets you view them live via a browser",
1315
Long: "Automates terminal operations and lets you view them live via a browser.",
1416
}

0 commit comments

Comments
 (0)