Skip to content

Commit 27e4ec6

Browse files
add version flag to query build information (#600)
1 parent efcb699 commit 27e4ec6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package main
88

99
import (
1010
"context"
11+
"flag"
1112
"fmt"
1213
"net"
1314
"os"
@@ -171,8 +172,15 @@ func main() {
171172
pgParamBlockList map[string]bool
172173

173174
standbyClusterSourceRanges []string
175+
176+
showVersion = flag.Bool("version", false, "dump current version and exit")
174177
)
175178

179+
flag.Parse()
180+
if *showVersion {
181+
fmt.Println(v.V.String())
182+
os.Exit(0)
183+
}
176184
ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
177185

178186
// TODO enable Prefix and update helm chart

0 commit comments

Comments
 (0)