summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-08 18:57:27 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-08 18:57:27 +1000
commitfbadbdd771985745f46406aaf5ce0ed4c7c35ff7 (patch)
treea4cceafd7c7114521aeef7425f844a36ff6fac39 /main.go
parentc6aee678c0be1192f5d09a9346430b9e1c5f52ff (diff)
version with tag
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/main.go b/main.go
index ba3a55d9e..f900bb051 100644
--- a/main.go
+++ b/main.go
@@ -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()