File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11REPO ?= github.com/codekoala/go-aws-lanes
2- TAG ?= dev
2+ TAG ?= $( shell git rev-parse HEAD) - dev
33BUILD_DATE := $(shell date +% FT% T% z)
44
55all : linux osx checksums
1212
1313build : bin
1414 $(eval SUFFIX=_$(GOOS ) _$(GOARCH ) )
15- go build -ldflags " -s -X $( REPO) /version.Tag =$( TAG) -X $( REPO) /version.BuildDate=$( BUILD_DATE) " -o ./bin/lanes$(SUFFIX ) ./cmd/lanes
15+ go build -ldflags " -s -X $( REPO) /version.Commit =$( TAG) -X $( REPO) /version.BuildDate=$( BUILD_DATE) " -o ./bin/lanes$(SUFFIX ) ./cmd/lanes
1616
1717checksums :
1818 cd ./bin/; sha256sum lanes* > SHA256SUMS
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ var versionCmd = &cobra.Command{
1313 Short : "Display Lanes version" ,
1414
1515 Run : func (cmd * cobra.Command , args []string ) {
16- cmd .Println ("lanes" , version .String ())
17- cmd .Println ("Build date:" , version .BuildDate )
18- cmd .Println ("Go:" , runtime .Version ())
16+ cmd .Println ("lanes" , version .Version )
17+ cmd .Println ("Commit:\t \t " , version .Commit )
18+ cmd .Println ("Build date:\t " , version .BuildDate )
19+ cmd .Println ("Go:\t \t " , runtime .Version ())
1920 },
2021}
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ import (
77
88var (
99 Version = "v0.1.0"
10- Tag = "dev"
10+ Commit = "dev"
1111 BuildDate string
1212)
1313
1414func String () string {
15- return fmt .Sprintf ("%s-%s" , Version , Tag )
15+ return fmt .Sprintf ("%s-%s" , Version , Commit )
1616}
1717
1818func Full () string {
You can’t perform that action at this time.
0 commit comments