Merge pull request #372 from thaJeztah/arch_detect

hack/util: take other arches into account on Darwin
pull/385/head
Tõnis Tiigi 4 years ago committed by GitHub
commit 1c7434a8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ case $buildmode in
esac
cacheVolume="buildx-cache"
if ! docker inspect "$cacheVolume" 2>&1 >/dev/null ; then
if ! docker inspect "$cacheVolume" > /dev/null 2>&1 ; then
cacheVolume=$(docker create --name=buildx-cache -v /root/.cache -v /go/pkg/mod alpine)
fi

@ -22,11 +22,14 @@ else
fi
if [ -z "$CLI_PLATFORM" ]; then
rawos=$(uname -s)
if [ "$rawos" = "Darwin" ]; then
CLI_PLATFORM="darwin/amd64"
elif uname -s | grep MINGW 2>&1 >/dev/null ; then
CLI_PLATFORM="windows/amd64"
fi
if [ "$(uname -s)" = "Darwin" ]; then
arch="$(uname -m)"
if [ "$arch" = "x86_64" ]; then
arch="amd64"
fi
CLI_PLATFORM="darwin/$arch"
elif uname -s | grep MINGW > /dev/null 2>&1 ; then
CLI_PLATFORM="windows/amd64"
fi
fi

Loading…
Cancel
Save