Return 0.0.0-unknown version if building without a git repo

This commit is contained in:
Zachary Yedidia
2016-10-11 15:25:39 -04:00
parent cbc250b7d0
commit a48c991958

View File

@@ -32,7 +32,7 @@ func main() {
version, err := semver.ParseTolerant(versionStr)
if err != nil {
// no version tag found so just return what ever we can find.
fmt.Println(getTag())
fmt.Println("0.0.0-unknown")
return
}
// Get the tag of the current revision.