File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ GOENV=CGO_ENABLED=0
33all : vip-manager
44
55vip-manager : * .go * /* .go
6- $(GOENV ) go build -ldflags=" -s -w" .
6+ $(GOENV ) go build -ldflags=" -s -w -X main.version= ` git describe --tags --abbrev=0 ` -X main.commit= ` git show -s --format=%H HEAD ` -X main.date= ` git show -s --format=%cI HEAD ` " .
77
88install :
99 install -d $(DESTDIR ) /usr/bin
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ import (
2020
2121var (
2222 // vip-manager version definition
23- version = "2.4.0"
23+ version = "master"
24+ commit = "none"
25+ date = "unknown"
2426)
2527
2628func getMask (vip netip.Addr , mask int ) net.IPMask {
@@ -48,6 +50,8 @@ func main() {
4850 // return nil, nil
4951 // }
5052 fmt .Printf ("version: %s\n " , version )
53+ fmt .Printf ("commit: %s\n " , commit )
54+ fmt .Printf ("date: %s\n " , date )
5155 return
5256 }
5357
You can’t perform that action at this time.
0 commit comments