Skip to content

Commit 3b596ce

Browse files
authored
Merge pull request #1262 from cloudfoundry/fix-cflinuxfs5-install-go
Add cflinuxfs5 to install_go.sh stack allowlist
2 parents 4b2a72b + 72d1d5e commit 3b596ce

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

scripts/install_go.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,27 @@ 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
1212
fi
1313

1414
local version expected_sha dir
15-
version="1.22.5"
16-
expected_sha="ddb12ede43eef214c7d4376761bd5ba6297d5fa7a06d5635ea3e7a276b3db730"
15+
version="1.25.6"
16+
expected_sha="0ed64e3b9cb9b1c2ec57880dae2427b0ee2676f2ae2fb53c2e1bb838c500f9fb"
1717
dir="/tmp/go${version}"
1818

1919
mkdir -p "${dir}"
2020

2121
if [[ ! -f "${dir}/bin/go" ]]; then
22-
local url
23-
# TODO: use exact stack based dep, after go buildpack has cflinuxfs4 support
24-
#url="https://buildpacks.cloudfoundry.org/dependencies/go/go_${version}_linux_x64_${CF_STACK}_${expected_sha:0:8}.tgz"
25-
url="https://buildpacks.cloudfoundry.org/dependencies/go/go_${version}_linux_x64_cflinuxfs3_${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"
2629

2730
echo "-----> Download go ${version}"
2831
curl "${url}" \

0 commit comments

Comments
 (0)