From 69727f2729f313c4ec38887a135c10515b4377a9 Mon Sep 17 00:00:00 2001
From: Silas Davis <silas@erisindustries.com>
Date: Tue, 5 Sep 2017 11:49:44 +0100
Subject: [PATCH] Deduplicate version number and bump

---
 client/cmd/burrow-client.go |  2 +-
 cmd/burrow.go               |  2 +-
 util/version/cmd/main.go    |  2 +-
 version/version.go          | 14 ++++++++------
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/client/cmd/burrow-client.go b/client/cmd/burrow-client.go
index 77f746a3..bb67c6ef 100644
--- a/client/cmd/burrow-client.go
+++ b/client/cmd/burrow-client.go
@@ -35,7 +35,7 @@ var BurrowClientCmd = &cobra.Command{
 Made with <3 by Monax Industries.
 
 Complete documentation is available at https://monax.io/docs
-` + "\nVERSION:\n " + version.VERSION,
+` + "\nVERSION:\n " + version.GetSemanticVersionString(),
 	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
 }
 
diff --git a/cmd/burrow.go b/cmd/burrow.go
index a29f3e1f..6fb48466 100644
--- a/cmd/burrow.go
+++ b/cmd/burrow.go
@@ -34,7 +34,7 @@ your needs.
 Made with <3 by Monax Industries.
 
 Complete documentation is available at https://monax.io/docs
-` + "\nVERSION:\n " + version.VERSION,
+` + "\nVERSION:\n " + version.GetSemanticVersionString(),
 	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
 }
 
diff --git a/util/version/cmd/main.go b/util/version/cmd/main.go
index c5711e20..3c7dd2ba 100644
--- a/util/version/cmd/main.go
+++ b/util/version/cmd/main.go
@@ -22,5 +22,5 @@ import (
 
 // Print the Burrow version
 func main() {
-	fmt.Println(version.VERSION)
+	fmt.Println(version.GetSemanticVersionString())
 }
diff --git a/version/version.go b/version/version.go
index b92218bb..16283656 100644
--- a/version/version.go
+++ b/version/version.go
@@ -32,7 +32,7 @@ const (
 	// Minor version component of the current release
 	versionMinor = 17
 	// Patch version component of the current release
-	versionPatch = 0
+	versionPatch = 1
 )
 
 var burrowVersion *VersionIdentifier
@@ -92,6 +92,13 @@ func (v *VersionIdentifier) GetMinorVersionString() string {
 		v.MinorVersion)
 }
 
+// Return the plain version string without the ClientIdentifier
+func  GetSemanticVersionString() string { return burrowVersion.GetSemanticVersionString() }
+func (v *VersionIdentifier) GetSemanticVersionString() string {
+	return fmt.Sprintf("%d.%d.%d", v.MajorVersion,
+		v.MinorVersion, v.PatchVersion)
+}
+
 // note: similar remark applies here on the use of `int` over `uint8`
 // for the arguments as above for MakeVersionString()
 func MakeMinorVersionString(client string, major, minor, patch int) string {
@@ -125,8 +132,3 @@ func (version *VersionIdentifier) MatchesMinorVersion(
 		version.MajorVersion == referenceMajor &&
 		version.MinorVersion == referenceMinor
 }
-
-//------------------------------------------------------------------------------
-// util/version/cmd prints this when run and is used to by build_tool.sh to obtain
-// Burrow version
-const VERSION = "0.17.0"
-- 
GitLab