Skip to content

Commit 5c27dd6

Browse files
authored
Merge pull request #18 from smlx/tweak-version
chore: move the version variables into version.go
2 parents 02c53be + 95aef47 commit 5c27dd6

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

cmd/go-cli-github/main.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import (
44
"github.com/alecthomas/kong"
55
)
66

7-
var (
8-
commit string
9-
date string
10-
goVersion string
11-
projectName string
12-
version string
13-
)
14-
157
// CLI represents the command-line interface.
168
type CLI struct {
179
Version VersionCmd `kong:"cmd,help='Print version information'"`

cmd/go-cli-github/version.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import (
55
"fmt"
66
)
77

8+
// These variables are set by GoReleaser during the build.
9+
var (
10+
commit string
11+
date string
12+
goVersion string
13+
projectName string
14+
version string
15+
)
16+
817
// VersionCmd represents the `version` command.
918
type VersionCmd struct{}
1019

0 commit comments

Comments
 (0)