Skip to content

Commit

Permalink
Update golang version to 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
app-autoscaler-ci-bot committed Mar 12, 2024
1 parent 4c6f8c4 commit 2137cae
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concourse 7.11.2
direnv 2.34.0
gcloud 467.0.0
ginkgo 2.16.0
golang 1.22.1
golang 1.21.3
golangci-lint 1.56.1
java temurin-17.0.10+7
make 4.4
Expand Down
25 changes: 14 additions & 11 deletions ci/autoscaler/tasks/update-sdk/update_golang_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@
[ -n "${DEBUG}" ] && set -x
set -euo pipefail

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
script_dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)"
source "${script_dir}/vars.source.sh"
source "${script_dir}/vendor_package.sh"

golang_dir=${GOLANG_DIR:-"${autoscaler_dir}/../golang-release"}
export golang_dir="$(realpath -e "${golang_dir}")"
golang_dir="$(realpath -e "${golang_dir}")"
export golang_dir

SED="sed"
which gsed >/dev/null && SED=gsed

# shellcheck disable=SC2154
golang_version=$( cat "${golang_dir}/packages/golang-1-linux/version")
stripped_go_version=$(echo "${golang_version}" | cut -d . -f -2)
golang_version=$(cat "${golang_dir}/packages/golang-1-linux/version")
golang_version="1.21.3"

step "updating mod files with ${stripped_go_version}"
# shellcheck disable=SC2154
find "${autoscaler_dir}" -name go.mod -type f -exec ${SED} -i "s/^[[:space:]]*go 1.*/go ${stripped_go_version}/g" "{}" \;
step "updating go.mod files with golang version ${golang_version}"
find "${autoscaler_dir}" -name go.mod -type f -exec ${SED} -i "s/^[[:space:]]*go 1.*/go ${golang_version}/g" "{}" \;

step "updating .tool-version with ${golang_version}"
step "updating go.work file with golang version ${golang_version}"
${SED} -i "s/^[[:space:]]*go 1.*/go ${golang_version}/g" "${autoscaler_dir}/go.work"

step "updating .tool-versions file with golang version ${golang_version}"
"${SED}" -i "s/golang 1.*/golang ${golang_version}/g" "${autoscaler_dir}/.tool-versions"

echo -n "${golang_version}" > ${autoscaler_dir}/version
vendor-package "$golang_dir" golang-1-linux "${golang_version}"
echo -n "${golang_version}" > "${autoscaler_dir}/version"
vendor-package "$golang_dir" golang-1-linux "${golang_version}"

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module apitester

go 1.22
go 1.21.3
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.21
go 1.21.3

use (
./src/acceptance
Expand Down
2 changes: 1 addition & 1 deletion packages/golang-1-linux/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.1
1.21.3
2 changes: 1 addition & 1 deletion src/acceptance/assets/app/go_app/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app

go 1.22
go 1.21.3

require (
github.com/cloudfoundry-community/go-cfenv v1.18.0
Expand Down
2 changes: 1 addition & 1 deletion src/acceptance/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module acceptance

go 1.22
go 1.21.3

require (
github.com/cloudfoundry/cf-test-helpers/v2 v2.9.0
Expand Down
2 changes: 1 addition & 1 deletion src/autoscaler/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module code.cloudfoundry.org/app-autoscaler/src/autoscaler

go 1.22
go 1.21.3

require (
code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20230113212937-05beac96f8c7
Expand Down
2 changes: 1 addition & 1 deletion src/changelog/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module changelog

go 1.22
go 1.21.3

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down
2 changes: 1 addition & 1 deletion src/changeloglockcleaner/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module changeloglockcleaner

go 1.22
go 1.21.3

require (
github.com/go-sql-driver/mysql v1.8.0
Expand Down

0 comments on commit 2137cae

Please sign in to comment.