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 010944d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 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=b19721114df5cefeca22926a97e635245849ddf6
CORE_BRANCH=version-status-php-fix2

# The test runner source for UI tests
WEB_COMMITID=b747d299b66a2f9f11559c8c14ce3d6fd64a6135
Expand Down
6 changes: 3 additions & 3 deletions extensions/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
"versionstring": version.GetString(),
"edition": "Community",
"productname": "Infinite Scale",
"product": "oCIS",
"product": "Infinite Scale",
"hostname": "",
},
"support_url_signing": true,
Expand Down Expand Up @@ -212,12 +212,12 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
},
"version": map[string]interface{}{
"product": "oCIS",
"product": "Infinite Scale",
"edition": "Community",
"major": version.Parsed().Major(),
"minor": version.Parsed().Minor(),
"micro": version.Parsed().Patch(),
"string": version.String,
"string": version.GetString(),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/ocdav/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func DefaultConfig() *config.Config {
Status: config.Status{
Version: version.Long(),
VersionString: version.GetString(),
Product: "oCIS",
Product: "Infinite Scale",
ProductName: "Infinite Scale",
Edition: "Community",
},
Expand Down
26 changes: 10 additions & 16 deletions ocis-pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,12 @@ func Compiled() time.Time {
return t
}

// GetString returns a version string with pre-releases and metadata
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()
}

// Parsed returns a semver Version
func Parsed() *semver.Version {
var versionToParse string
if String == "dev" {
Expand All @@ -41,18 +35,18 @@ func Parsed() *semver.Version {
parsedVersion, err := semver.NewVersion(versionToParse)
// We have no semver version but a commitid
if err != nil {
parsedVersion, _ = semver.NewVersion("0.0.0+" + String)
parsedVersion, err = semver.NewVersion("0.0.0+" + String)
// this should never happen
if err != nil {
return &semver.Version{}
}
}
return parsedVersion
}

// Long returns the legacy version with 4 number parts like 10.9.8.0
func Long() string {
var s string
if Parsed().Metadata() == "" {
s = "-" + Parsed().Prerelease()
}
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"
}

0 comments on commit 010944d

Please sign in to comment.