Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gongmax committed May 13, 2024
1 parent dea3512 commit 8f572ce
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/ISSUE_TEMPLATE/golang_version_upgrade.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
Steps to upgrade Golang version:
- [ ] At the root of the directory, run:
- [ ] Update `go.mod` and `go.sum`. At the root of the directory, run:
- [ ] `find . -name 'go.mod' -not -path '*/\.*' -execdir go mod edit -go=<NEW_GOLANG_VERSION_WITHOUT_PATCH> \;`
- [ ] `find . -name 'go.mod' -not -path '*/\.*' -execdir go mod tidy \;`

`go mod edit -go=<NEW_GOLANG_VERSION> && go mod tidy`
- [ ] Update the Dockerfiles for `build` directory. At the root of the directory, run:

`find build -type f \( -not -path '*/\.*' -and -not -path 'build/tmp/*' \) -exec sed -i 's/GO_VERSION=[0-9]\+\.[0-9]\+\.[0-9]\+/GO_VERSION=<NEW_GOLANG_VERSION>/g' {} \;`

- [ ] Update `go.mod` files for the `build` directory. At `build/script` directory, run:
- [ ] `find . -name 'go.mod' -execdir go mod edit -go=<NEW_GOLANG_VERSION_WITHOUT_PATCH> \;`
- [ ] `find . -name 'go.mod' -execdir go mod tidy \;`

- [ ] Update the Go version for each example that was written in Golang:
- [ ] Update Dockerfiles. At the `examples` directory, run:
- [ ] `find examples -name Dockerfile -exec sed -i 's/golang:[0-9]\+\.[0-9]\+-alpine/golang:<NEW_GOLANG_VERSION_WITHOUT_PATCH>-alpine/g' {} \;`
- [ ] `find examples -name Dockerfile -o -name Dockerfile.windows -exec sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:<NEW_GOLANG_VERSION>/g' {} \;`
- [ ] Update `go.mod` files. At `examples` directory, run:
- [ ] `find . -name 'go.mod' -execdir go mod edit -go=<NEW_GOLANG_VERSION_WITHOUT_PATCH> \;`
- [ ] `find . -name 'go.mod' -execdir go mod tidy \;`
- [ ] Update the example images tag. At `build` directory, run:
- [ ] `make bump-image IMAGENAME=autoscaler-webhook VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=crd-client VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=custom-controller VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=simple-game-server VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=simple-genai-game-server VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=supertuxkart-example VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=xonotic-example VERSION=<current-image-version>`
- [ ] Update the Dockerfiles for `examples` directory. At the root of the directory, run:
- [ ] `find examples -name Dockerfile -exec sed -i 's/golang:[0-9]\+\.[0-9]\+-alpine/golang:<NEW_GOLANG_VERSION_WITHOUT_PATCH>-alpine/g' {} \;`
- [ ] `find examples \( -name Dockerfile -o -name Dockerfile.windows \) -exec sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:<NEW_GOLANG_VERSION>/g' {} \;`

- [ ] Update the example images tag. At `build` directory, run:
- [ ] `make bump-image IMAGENAME=autoscaler-webhook VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=crd-client VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=custom-controller VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=simple-game-server VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=simple-genai-game-server VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=supertuxkart-example VERSION=<current-image-version>`
- [ ] `make bump-image IMAGENAME=xonotic-example VERSION=<current-image-version>`

- [ ] Create a PR for the above changes and send for review

- [ ] After the above PR is approved, merge it and run the following at `build` directory to generate and push the new example images:
- [ ] After the above PR is approved, **before** merging it, run the following at `build` directory to generate and push the new example images:

`export REGISTRY=us-docker.pkg.dev/agones-images/examples`

`make gcloud-auth-docker`

`make build-go-examples && make push-example-golang-images`
`make build-go-examples && make push-example-golang-images`

- [ ] Merge the above PR

0 comments on commit 8f572ce

Please sign in to comment.