From 3973ffbbd5fb62b4194c60c919a1d8a2ee629ec8 Mon Sep 17 00:00:00 2001 From: pashakostohrys Date: Wed, 13 Dec 2023 17:02:45 +0200 Subject: [PATCH] chore: update version to 2.8-2023.12.13-99e14b70b --- VERSION | 2 +- .../CHANGELOG-2.8-2023.12.13-99e14b70b.md | 3 ++ hack/release/main.go | 35 +++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 changelog/CHANGELOG-2.8-2023.12.13-99e14b70b.md diff --git a/VERSION b/VERSION index 870ac958c8826..b3f89d8606cf0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8-2023.12.06-da4f96e57 \ No newline at end of file +2.8-2023.12.13-99e14b70b \ No newline at end of file diff --git a/changelog/CHANGELOG-2.8-2023.12.13-99e14b70b.md b/changelog/CHANGELOG-2.8-2023.12.13-99e14b70b.md new file mode 100644 index 0000000000000..55bbc626a888c --- /dev/null +++ b/changelog/CHANGELOG-2.8-2023.12.13-99e14b70b.md @@ -0,0 +1,3 @@ +### Event reporter v2.0.1 + +* Feat: Enable HTTP communication for the event reporter and utilize gRPC for resolving the "cannot assign requested address" issue. This can be activated by setting the USE_GRPC variable to false. \ No newline at end of file diff --git a/hack/release/main.go b/hack/release/main.go index 6be93babd5fa7..28503769239ca 100644 --- a/hack/release/main.go +++ b/hack/release/main.go @@ -111,6 +111,14 @@ func release() error { fmt.Printf("Changelog: %s\n", changelog) release := fmt.Sprintf("release-v%s", version) fmt.Printf("Release: %s\n", release) + err = moveChangelog() + if err != nil { + return err + } + err = commitChanges(version) + if err != nil { + return err + } // git tag -a v2.9.3-2021.07.07-3a4b7f4 -m "Codefresh version for synced 2.9.3" _ = exec.Command("git", "tag", "-d", release).Run() cmd := exec.Command("git", "tag", "-a", release, "-m", changelog) @@ -124,9 +132,30 @@ func release() error { if err := cmd.Run(); err != nil { return err } - err = moveChangelog() - if err != nil { + return exec.Command("git", "push", "origin", "--delete", release).Run() +} + +func commitChanges(version string) error { + // git add VERSION + cmd := exec.Command("git", "add", "VERSION") + if err := cmd.Run(); err != nil { return err } - return exec.Command("git", "push", "origin", "--delete", release).Run() + + cmd = exec.Command("git", "add", fmt.Sprintf("changelog/CHANGELOG-%s.md", version)) + if err := cmd.Run(); err != nil { + return err + } + + cmd = exec.Command("git", "commit", "-a", "-m", fmt.Sprintf("chore: update version to %s", version)) + if err := cmd.Run(); err != nil { + return err + } + + cmd = exec.Command("git", "push") + if err := cmd.Run(); err != nil { + return err + } + + return nil }