Merge pull request #4434 from jwmatthews/install_arch

Install arch appropriate build if the 'arch' command is present
This commit is contained in:
Kubernetes Prow Robot
2022-02-28 09:18:57 -08:00
committed by GitHub

View File

@@ -95,13 +95,31 @@ trap cleanup EXIT ERR
pushd "$tmpDir" >& /dev/null
opsys=windows
arch=amd64
if [[ "$OSTYPE" == linux* ]]; then
opsys=linux
elif [[ "$OSTYPE" == darwin* ]]; then
opsys=darwin
fi
# Supported values of 'arch': amd64, arm64, ppc64le, s390x
case $(uname -m) in
x86_64)
arch=amd64
;;
arm64)
arch=arm64
;;
ppc64le)
arch=ppc64le
;;
s390x)
arch=s390x
;;
*)
arch=amd64
;;
esac
releases=$(curl -s $release_url)
if [[ $releases == *"API rate limit exceeded"* ]]; then