Skip to content

Commit

Permalink
Fix vals version (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke authored Oct 20, 2022
1 parent a2c08bf commit c15c774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Version := $(shell git describe --tags --dirty)
GitCommit := $(shell git rev-parse HEAD)
LDFLAGS := "-X main.Version=$(Version) -X main.GitCommit=$(GitCommit)"
LDFLAGS := "-X main.version=$(Version) -X main.commit=$(GitCommit)"

build:
go build -ldflags $(LDFLAGS) -o bin/vals ./cmd/vals
Expand Down
10 changes: 5 additions & 5 deletions cmd/vals/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
)

var (
Version string
GitCommit string
version string
commit string
)

func flagUsage() {
Expand Down Expand Up @@ -162,12 +162,12 @@ func main() {
}
}
case CmdVersion:
if len(Version) == 0 {
if len(version) == 0 {
fmt.Println("Version: dev")
} else {
fmt.Println("Version:", Version)
fmt.Println("Version:", version)
}
fmt.Println("Git Commit:", GitCommit)
fmt.Println("Git Commit:", commit)
default:
flag.Usage()
}
Expand Down

0 comments on commit c15c774

Please sign in to comment.