Skip to content

Commit

Permalink
Upgrade to Go 1.20 (GoogleCloudPlatform#9506)
Browse files Browse the repository at this point in the history
* Upgrade TPG/TPGB go.mod to Go 1.20

* Upgrade doctor script to check users have Go 1.20 for building the provider

* Update workflows that interact with the provider codebase directly

* Update tpgtools to Go 1.20

* Upgrade everything else from Go 1.19 to Go 1.20
  • Loading branch information
SarahFrench authored Nov 30, 2023
1 parent 08dfecd commit 61f0388
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .ci/magician/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module magician

go 1.19
go 1.20

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'
go-version: '^1.20'

# Cache Go modules
- name: Cache Go modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/membership-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.19.1'
go-version: '^1.20.1'
- name: Run membership checker unit tests
run: |
cd .ci/magician
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@v3
with:
go-version: '^1.19'
go-version: '^1.20'
- name: Build Terraform Google Conversion
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@v3
with:
go-version: '^1.19'
go-version: '^1.20'
- name: Build Provider
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'
go-version: '^1.20'

- name: Cache Go modules and build cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'
go-version: '^1.20'

- name: Cache Go modules and build cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests-diff-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.19.1'
go-version: '^1.20.1'

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/docs

go 1.19
go 1.20

require (
github.com/alex-shpak/hugo-book v0.0.0-20230424134111-d86d5e70c7c0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% autogen_exception -%>
module github.com/hashicorp/terraform-provider-google
go 1.19
go 1.20

require (
cloud.google.com/go/bigtable v1.19.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/doctor
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ if [ $found -eq 0 ]; then
else
version=($(go version))
version=${version[2]}
if [[ "$version" < "go1.19.0" ]]; then
if [[ "$version" < "go1.20.0" ]]; then
exitcode=1
warn "yel" " $version is installed, but go 1.19 or later is required. See https://golang.org/doc/install for information on installing it."
warn "yel" " $version is installed, but go 1.20 or later is required. See https://golang.org/doc/install for information on installing it."
fi
if [[ -z "${GOPATH}" ]]; then
exitcode=1
Expand Down
2 changes: 1 addition & 1 deletion tools/diff-processor/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor

go 1.19
go 1.20

replace google/provider/old => ./old

Expand Down
2 changes: 1 addition & 1 deletion tools/issue-labeler/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler

go 1.19
go 1.20

require (
github.com/golang/glog v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion tools/missing-test-detector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/trodge/magic-modules/tools/missing-test-detector

go 1.19
go 1.20

replace google/provider/old => github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20230302220542-203a52c6e3e1

Expand Down
2 changes: 1 addition & 1 deletion tools/teamcity-generator/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/teamcity-generator

go 1.19
go 1.20

require golang.org/x/text v0.11.0
2 changes: 1 addition & 1 deletion tpgtools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tpgtools

go 1.19
go 1.20

require (
bitbucket.org/creachadair/stringset v0.0.11
Expand Down

0 comments on commit 61f0388

Please sign in to comment.