Skip to content

Commit faa2742

Browse files
Updating github-config
1 parent 936a4ca commit faa2742

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/install_go.sh

Lines changed: 8 additions & 3 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" ]]; 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,8 +19,13 @@ function main() {
1919
mkdir -p "${dir}"
2020

2121
if [[ ! -f "${dir}/bin/go" ]]; then
22-
local url
23-
url="https://buildpacks.cloudfoundry.org/dependencies/go/go_${version}_linux_x64_${CF_STACK}_${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"
2429

2530
echo "-----> Download go ${version}"
2631
curl "${url}" \

0 commit comments

Comments
 (0)