Skip to content

Commit 397d5cf

Browse files
committed
fix version format
1 parent 5ca7cb0 commit 397d5cf

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

main.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ import (
2020

2121
var (
2222
// Version contains the current version.
23-
Version = "dev"
23+
version = "dev"
2424
// BuildDate contains a string with the build date.
25-
BuildDate = "unknown"
25+
date = "unknown"
26+
// commit
27+
commit = "dirty"
28+
// buildBy
29+
builtBy = "local"
2630
)
2731

2832
func main() {
@@ -37,11 +41,13 @@ func main() {
3741
Name: "secrets-init",
3842
Usage: "enrich environment variables with secrets from secret manager",
3943
Action: mainCmd,
40-
Version: Version,
44+
Version: version,
4145
}
4246
cli.VersionPrinter = func(c *cli.Context) {
43-
fmt.Printf("secrets-init %s\n", Version)
44-
fmt.Printf(" build date: %s\n", BuildDate)
47+
fmt.Printf("secrets-init %s\n", version)
48+
fmt.Printf(" build date: %s\n", date)
49+
fmt.Printf(" commit: %s\n", commit)
50+
fmt.Printf(" built by: %s\n", builtBy)
4551
fmt.Printf(" built with: %s\n", runtime.Version())
4652
}
4753

0 commit comments

Comments
 (0)