1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Update CHANGELOG

This commit is contained in:
ajanikow 2024-10-14 12:14:05 +00:00
parent f120614281
commit 21bb072033
No known key found for this signature in database
GPG key ID: BD072E1332E4C605
2 changed files with 38 additions and 3 deletions

View file

@ -1,6 +1,8 @@
# Change Log
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
- (Feature) ArangoRoute CRD
- (Feature) ArangoRoute Operator
- (Feature) Add Kubernetes Services for Group

View file

@ -381,6 +381,39 @@ func writeFrontMatter(t *testing.T, out io.Writer, keyVals map[string]string) {
}
func extractVersion(t *testing.T, root string) *semver.Version {
if v := extractVersionFile(t, root); v != nil {
return v
} else {
t.Logf("Unable to get Version from file, fallback to git")
}
if v := extractVersionGit(t, root); v != nil {
return v
} else {
t.Logf("Unable to get Version from Git")
}
require.FailNow(t, "Unable to get version")
return nil
}
func extractVersionFile(t *testing.T, root string) *semver.Version {
data, err := os.ReadFile(path.Join(root, "VERSION"))
require.NoError(t, err)
v := strings.TrimSpace(string(data))
sm, err := semver.NewVersion(v)
require.NoError(t, err)
if v := sm.PreRelease.Slice(); len(v) > 0 && v[0] != "" {
return nil
}
return sm
}
func extractVersionGit(t *testing.T, root string) *semver.Version {
cmd := exec.Command("git", "tag", "--list")
cmd.Dir = root
@ -410,12 +443,12 @@ func extractVersion(t *testing.T, root string) *semver.Version {
require.NoError(t, cmd.Wait())
sort.Sort(versions)
if len(versions) == 0 {
require.Fail(t, "Required at least one version")
return nil
}
sort.Sort(versions)
return versions[len(versions)-1]
}