Skip to content

Commit 2692523

Browse files
committed
chore(release): release and ci updated
1 parent 8a75816 commit 2692523

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.goreleaser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ builds:
88
- -X github.com/apiqube/cli/cmd/cli.version={{.Version}}
99
- -X github.com/apiqube/cli/cmd/cli.commit={{.ShortCommit}}
1010
- -X github.com/apiqube/cli/cmd/cli.date={{.Date}}
11+
env:
12+
- CGO_ENABLED=0
1113
goos: [linux, darwin, windows]
1214
goarch: [amd64, arm64]
1315

cmd/cli/version.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ import (
77
)
88

99
var (
10-
version = "dev"
11-
commit = ""
12-
date = ""
10+
Version = "dev"
11+
Commit = ""
12+
Date = ""
1313
)
1414

1515
var versionCmd = &cobra.Command{
16-
Use: "version",
17-
Short: "Print the version number",
16+
Use: "Version",
17+
Short: "Print the Version number",
1818
SilenceUsage: true,
1919
SilenceErrors: true,
2020
Run: func(cmd *cobra.Command, args []string) {
21-
data := fmt.Sprintf("Qube CLI\nVersion: %s", version)
21+
data := fmt.Sprintf("Qube CLI\nVersion: %s", Version)
2222

23-
if commit != "" {
24-
data += fmt.Sprintf("\nCommit: %s", commit)
23+
if Commit != "" {
24+
data += fmt.Sprintf("\nCommit: %s", Commit)
2525
}
2626

27-
if date != "" {
28-
data += fmt.Sprintf("\nDate: %s", date)
27+
if Date != "" {
28+
data += fmt.Sprintf("\nDate: %s", Date)
2929
}
3030

3131
fmt.Println(data)

0 commit comments

Comments
 (0)