Skip to content

Commit

Permalink
chore: update version to 2.8-2023.12.13-99e14b70b
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Dec 13, 2023
1 parent 99e14b7 commit 3973ffb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8-2023.12.06-da4f96e57
2.8-2023.12.13-99e14b70b
3 changes: 3 additions & 0 deletions changelog/CHANGELOG-2.8-2023.12.13-99e14b70b.md
Original file line number Diff line number Diff line change
@@ -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.
35 changes: 32 additions & 3 deletions hack/release/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}

0 comments on commit 3973ffb

Please sign in to comment.