diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-08 18:57:27 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-08 18:57:27 +1000 |
commit | fbadbdd771985745f46406aaf5ce0ed4c7c35ff7 (patch) | |
tree | a4cceafd7c7114521aeef7425f844a36ff6fac39 /main.go | |
parent | c6aee678c0be1192f5d09a9346430b9e1c5f52ff (diff) |
version with tag
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -12,9 +12,15 @@ import ( ) var ( - startTime time.Time - debugging bool - Rev string + startTime time.Time + debugging bool + + // Rev - Git Revision + Rev string + + // Version - Version number + Version = "unversioned" + builddate string debuggingPointer = flag.Bool("debug", false, "a boolean") versionFlag = flag.Bool("v", false, "Print the current version") @@ -67,7 +73,7 @@ func main() { devLog("\n\n\n\n\n\n\n\n\n\n") flag.Parse() if *versionFlag { - fmt.Printf("rev=%s, build date=%s", Rev, builddate) + fmt.Printf("rev=%s, build date=%s, version=%s", Rev, builddate, Version) os.Exit(0) } verifyInGitRepo() |