Skip to content

Commit

Permalink
Version bump to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeziel committed Jun 22, 2022
1 parent c2148b2 commit 58cf517
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions pkg/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)'"
Expand All @@ -17,22 +17,17 @@ 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 {
versionCore = fmt.Sprintf("%s-%s%d", versionCore, VersionReleaseLevel, VersionReleaseNumber)
} 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
Expand Down

0 comments on commit 58cf517

Please sign in to comment.