Skip to content

Commit b5ad991

Browse files
authored
Merge branch 'master' into cflinuxfs5-release-prep
2 parents e84624b + 13497f4 commit b5ad991

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scripts/install_go.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -u
55
set -o pipefail
66

77
function main() {
8-
if [[ "${CF_STACK:-}" != "cflinuxfs3" && "${CF_STACK:-}" != "cflinuxfs4" && "${CF_STACK:-}" != "cflinuxfs5" ]]; then
8+
if [[ "${CF_STACK:-}" != "cflinuxfs4" && "${CF_STACK:-}" != "cflinuxfs5" ]]; then
99
echo " **ERROR** Unsupported stack"
1010
echo " See https://docs.cloudfoundry.org/devguide/deploy-apps/stacks.html for more info"
1111
exit 1
@@ -19,9 +19,13 @@ function main() {
1919
mkdir -p "${dir}"
2020

2121
if [[ ! -f "${dir}/bin/go" ]]; then
22-
local url
23-
# TODO: use exact stack based dep, when go is built for all supported stacks
24-
url="https://buildpacks.cloudfoundry.org/dependencies/go/go_${version}_linux_x64_cflinuxfs4_${expected_sha:0:8}.tgz"
22+
local url stack_for_download
23+
# Use cflinuxfs4 binary for cflinuxfs5 (compatible)
24+
stack_for_download="${CF_STACK}"
25+
if [[ "${CF_STACK}" == "cflinuxfs5" ]]; then
26+
stack_for_download="cflinuxfs4"
27+
fi
28+
url="https://buildpacks.cloudfoundry.org/dependencies/go/go_${version}_linux_x64_${stack_for_download}_${expected_sha:0:8}.tgz"
2529

2630
echo "-----> Download go ${version}"
2731
curl "${url}" \

0 commit comments

Comments
 (0)