Skip to content

Commit

Permalink
bump core commitID
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed May 7, 2022
1 parent 5f0c635 commit 546ddc9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The test runner source for API tests
CORE_COMMITID=403bd55c38a823f7915a04105e95fad5db84185b
CORE_BRANCH=master
CORE_COMMITID=a4a01ea97c126fa780318743ea1b47f3245acc1c
CORE_BRANCH=version-status-php-fix2

# The test runner source for UI tests
WEB_COMMITID=b747d299b66a2f9f11559c8c14ce3d6fd64a6135
Expand Down
2 changes: 1 addition & 1 deletion extensions/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
"major": version.Parsed().Major(),
"minor": version.Parsed().Minor(),
"micro": version.Parsed().Patch(),
"string": version.String,
"string": version.GetString(),
},
},
},
Expand Down
22 changes: 8 additions & 14 deletions ocis-pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@ func Compiled() time.Time {
}

func GetString() string {
if String == "dev" {
return "0.0.0+dev"
}
parsedVersion, err := semver.NewVersion(String)
// We have no semver version but a commitid
if err != nil {
return String
}
return parsedVersion.String()
return Parsed().String()
}

func Parsed() *semver.Version {
Expand All @@ -47,12 +39,14 @@ func Parsed() *semver.Version {
}

func Long() string {
var s string
if Parsed().Metadata() == "" {
s = "-" + Parsed().Prerelease()
var p, m string
if Parsed().Prerelease() != "" {
p = "-" + Parsed().Prerelease()
}
if Parsed().Metadata() != "" {
m = "+" + Parsed().Metadata()
}
s = "+" + Parsed().Metadata()
return strconv.FormatInt(Parsed().Major(), 10) + "." +
strconv.FormatInt(Parsed().Minor(), 10) + "." +
strconv.FormatInt(Parsed().Patch(), 10) + "." + "0" + s
strconv.FormatInt(Parsed().Patch(), 10) + "." + "0" + p + m
}

0 comments on commit 546ddc9

Please sign in to comment.