bump go version

This commit is contained in:
ston1th 2026-03-12 10:58:40 +01:00
commit 74bf8d88e8

View file

@ -28,8 +28,13 @@ v22_sum="71cbf4f555da51df93f71b1726c69f2e80f62bbe2e7ce1c5c39c3d57fa385b14"
v22_bootstrap="${install_dir}/bootstrap-${v22}"
tgz22="${v22}.tar.gz"
path_v22="${install_dir}/${tgz22}"
v24="go1.24.6"
v24_sum="d6f58fd519d140b7656b115ec9c57788d82346504149c262ba2e0e8eb78745ca"
v24_bootstrap="${install_dir}/bootstrap-${v24}"
tgz24="${v24}.tar.gz"
path_v24="${install_dir}/${tgz24}"
v="${1-1.25.3}"
v="${1-1.26.1}"
case "${v}" in
1.16.7) new_sum="07502f16366fbc697b1b09b842d29116e6d6607c9dc42b1d7c54b96f528c7952";;
1.17.1) new_sum="670ce36e100669f9be572a1603858ce4a64eb4b21a31fa5cdefb778609c40337";;
@ -55,10 +60,13 @@ case "${v}" in
1.23.0) new_sum="0bc1065ced4718d43c8cf945e7c321b6a8814defd4f7cae9588719494021bddf" v1_22=1;;
1.23.2) new_sum="fc3448a68fca887ceb0e0d4357d0ecd05d54a78e052f8667b283e745c87e7f2e" v1_22=1;;
1.23.5) new_sum="742aa265a47019d2b87bd3d9c42fd7f1e2fed133557e64b0a3e8749925ce5123" v1_22=1;;
1.24.6) new_sum="d6f58fd519d140b7656b115ec9c57788d82346504149c262ba2e0e8eb78745ca" v1_22=1;;
1.25.2) new_sum="301f8d65edb32ab2080fbe80b559a6369c0e3f792d2b0d1078a2764f8b579bcb" v1_25=1;;
1.25.3) new_sum="8c062cdccde8fcb9311412f33b6c068db7799943e7f10c77d624769bc4c27973" v1_25=1;;
1.26.1) new_sum="3760eb156f38f30eb508f70bd75955bd20aeea99899f5b43b336b63fcb89bdf3" v1_26=1;;
*) errx "no hash found for version ${v}";;
esac
[[ "${v1_26}" -eq 1 ]] && v1_25=1
[[ "${v1_25}" -eq 1 ]] && v1_22=1
[[ "${v1_22}" -eq 1 ]] && v1_20=1
@ -97,6 +105,13 @@ if [[ "${v1_25}" -eq 1 ]] && [[ ! -d "${v22_bootstrap}" ]]; then
mv ${install_dir}/go-${v22} ${v22_bootstrap}
fi
if [[ "${v1_26}" -eq 1 ]] && [[ ! -d "${v24_bootstrap}" ]]; then
curl -sSL "${url}/${tgz24}" >${path_v24}
[[ "$(sha256sum ${path_v24}|cut -d" " -f1)" != "${v24_sum}" ]] && errx "wrong checksum: ${path_v24}"
tar xfz ${path_v24} -C ${install_dir}
mv ${install_dir}/go-${v24} ${v24_bootstrap}
fi
if [[ ! -d "${new_dir}" ]]; then
curl -sSL "${url}/${tgznew}" >${path_new}
[[ -z "${new_sum}" ]] && { echo "hashsum for version ${new}:"; sha256sum ${path_new}|cut -d" " -f1; exit 0; }
@ -129,8 +144,16 @@ if [[ "${v1_25}" -eq 1 ]] && [[ ! -x "${v22_bootstrap}/bin/go" ]]; then
./make.bash
fi
if [[ "${v1_26}" -eq 1 ]] && [[ ! -x "${v24_bootstrap}/bin/go" ]]; then
export GOROOT_BOOTSTRAP=${v22_bootstrap}
cd ${v24_bootstrap}/src
./make.bash
fi
if [[ ! -x "${new_dir}/bin/go" ]]; then
if [[ "${v1_25}" -eq 1 ]]; then
if [[ "${v1_26}" -eq 1 ]]; then
bootstrap=${v24_bootstrap}
elif [[ "${v1_25}" -eq 1 ]]; then
bootstrap=${v22_bootstrap}
elif [[ "${v1_22}" -eq 1 ]]; then
bootstrap=${v20_bootstrap}