diff --git a/cmd/apiary.go b/cmd/apiary.go index bdb01ba..3e347d9 100644 --- a/cmd/apiary.go +++ b/cmd/apiary.go @@ -23,7 +23,7 @@ import ( func main() { app := &cli.App{ Name: "apiary", - Version: apiary.Version, + Version: apiary.FullVersion(), Authors: []*cli.Author{ { Name: "Torjus HÃ¥kestad", diff --git a/version.go b/version.go index 24d443e..71ba5ba 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,14 @@ package apiary +import "fmt" + var Version = "v0.1.1" var Build string + +func FullVersion() string { + if Build != "" { + return fmt.Sprintf("%s-%s", Version, Build) + } + + return Version +}