Skip to content

Commit

Permalink
Mess with version params
Browse files Browse the repository at this point in the history
  • Loading branch information
Rethereum committed Dec 16, 2023
1 parent 1622340 commit 20a9672
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ import (
)

const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 13 // Minor version component of the current release
VersionPatch = 1 // Patch version component of the current release
VersionMeta = "dev" // Version metadata to append to the version string
VersionMetaStable = "stable"
VersionMetaDev = "dev"
VersionMajor = 1 // Major version component of the current release
VersionMinor = 13 // Minor version component of the current release
VersionPatch = 1 // Patch version component of the current release
VersionMeta = VersionMetaStable // Version metadata to append to the version string
)

// Version holds the textual version string.
Expand All @@ -46,7 +48,7 @@ var VersionWithMeta = func() string {
// releases.
func ArchiveVersion(gitCommit string) string {
vsn := Version
if VersionMeta != "stable" {
if VersionMeta != VersionMetaStable {
vsn += "-" + VersionMeta
}
if len(gitCommit) >= 8 {
Expand All @@ -60,7 +62,7 @@ func VersionWithCommit(gitCommit, gitDate string) string {
if len(gitCommit) >= 8 {
vsn += "-" + gitCommit[:8]
}
if (VersionMeta != "stable") && (gitDate != "") {
if (VersionMeta != VersionMetaStable) && (gitDate != "") {
vsn += "-" + gitDate
}
return vsn
Expand Down

0 comments on commit 20a9672

Please sign in to comment.