diff --git a/client/cmd/burrow-client.go b/client/cmd/burrow-client.go index 77f746a38f4cee038f141e265f1c9ebbeacb0857..bb67c6ef4e92843c6d52dc557f0c5afa6a4452a8 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 a29f3e1fee9ace78eedd4f81eeed42f086834d3b..6fb484661b589a7a101064b972e1e30d0fad86dc 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 c5711e205dc6e67ac7c472afe3922e0d6714c892..3c7dd2ba5fc3a6a5069fa81f9d43c83511049390 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 b92218bb3ac749a50cbdf4601a4455c61f0955bb..16283656300c00d946d6711ca27e3cf9015ff25a 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"