Skip to content

Commit

Permalink
Release Checklist Cleanup (#3258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalaiselvi84 authored Jul 13, 2023
1 parent 72958cf commit 15e43ed
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
15 changes: 10 additions & 5 deletions build/scripts/sdk-update-version/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func main() {
log.Printf("Version: %s", version)

files := []string{
"build/Makefile",
"install/helm/agones/Chart.yaml",
"install/yaml/install.yaml",
"install/helm/agones/values.yaml",
Expand Down Expand Up @@ -87,14 +88,18 @@ func UpdateFile(filename string, version string) error {
content = re.ReplaceAllString(content, "${1}")
}
case "after":
if ext == ".json" {
if ext != ".json" {
re := regexp.MustCompile(regexp.QuoteMeta(version))
newVersion := incrementVersionAfterRelease(version)
if filename == "build/Makefile" {
content = re.ReplaceAllString(content, newVersion)
} else {
content = re.ReplaceAllString(content, newVersion+"-dev")
}
} else {
re := regexp.MustCompile(`"` + regexp.QuoteMeta(version) + `"`)
newVersion := incrementVersionAfterRelease(version) + "-dev"
content = re.ReplaceAllString(content, `"`+newVersion+`"`)
} else {
re := regexp.MustCompile(regexp.QuoteMeta(version))
newVersion := incrementVersionAfterRelease(version)
content = re.ReplaceAllString(content, newVersion+"-dev")
}
default:
log.Fatalf("Invalid release stage. Please specify 'before' or 'after'.")
Expand Down
16 changes: 12 additions & 4 deletions build/scripts/site-config-update-version/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,18 @@ func writeLinesToFile(filePath string, lines []string) error {
writer := bufio.NewWriter(file)

// Write the lines to the file
for _, line := range lines {
_, err := writer.WriteString(line + "\n")
if err != nil {
return err
for i, line := range lines {
// Avoid adding a new line at the end of the file
if i < len(lines)-1 {
_, err := writer.WriteString(line + "\n")
if err != nil {
return err
}
} else {
_, err := writer.WriteString(line)
if err != nil {
return err
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions docs/governance/templates/release_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ and copy it into a release issue. Fill in relevant values, found inside {}

- [ ] Run `make shell` and run `gcloud config configurations activate agones-images`.
- [ ] Review merged PRs in the current milestone to ensure that they have appropriate tags.
- [ ] Ensure the next stable releases in the Google Calendar have the correct version number.
- [ ] `git checkout main && git pull --rebase upstream main`
- [ ] Run `make pre-build-release` to ensure all example images exist on agones-images/examples repository and to deploy the {version}-1 service on GCP/App Engine/Services.
- [ ] Run `make sdk-update-version release_stage=before version={version}` file. This command will update the version number in the sdks/install files to {version}.
Expand Down Expand Up @@ -63,7 +62,6 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] Paste the announcement blog post to the #users Slack group.
- [ ] Post to the [agonesdev](https://twitter.com/agonesdev) Twitter account.
- [ ] Run `git checkout main`.
- [ ] Then increment the `base_version` in [`build/Makefile`][build-makefile]
- [ ] Run `make sdk-update-version release_stage=after version={version}` file. This command will update the version number in the sdks/install files to {version}+1-dev.
- [ ] Create PR with these changes, and merge them with approval
- [ ] Close this issue. _Congratulations!_ - the release is now complete! :tada: :clap: :smile: :+1:
Expand Down

0 comments on commit 15e43ed

Please sign in to comment.