From 58cf5171d92440ca44411a44f6595db3fd9d2ac7 Mon Sep 17 00:00:00 2001 From: Patrick Deziel Date: Wed, 22 Jun 2022 17:38:26 -0500 Subject: [PATCH] Version bump to 1.0.0 --- pkg/version.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg/version.go b/pkg/version.go index ad6c580..91f3cd2 100644 --- a/pkg/version.go +++ b/pkg/version.go @@ -7,8 +7,8 @@ const ( VersionMajor = 1 VersionMinor = 0 VersionPatch = 0 - VersionReleaseLevel = "beta" - VersionReleaseNumber = 7 + VersionReleaseLevel = "" + VersionReleaseNumber = 0 ) // Set the GitVersion via -ldflags="-X 'github.com/trisacrypto/testnet/pkg.GitVersion=$(git rev-parse --short HEAD)'" @@ -17,11 +17,6 @@ var GitVersion string // Version returns the semantic version for the current build. func Version() string { var versionCore string - if VersionPatch > 0 { - versionCore = fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) - } else { - versionCore = fmt.Sprintf("%d.%d", VersionMajor, VersionMinor) - } if VersionReleaseLevel != "" { if VersionReleaseNumber > 0 { @@ -29,10 +24,10 @@ func Version() string { } else { versionCore = fmt.Sprintf("%s-%s", versionCore, VersionReleaseLevel) } - } - - if GitVersion != "" { + } else if GitVersion != "" { versionCore = fmt.Sprintf("%s (%s)", versionCore, GitVersion) + } else { + versionCore = fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) } return versionCore