Fix build script for Apple Silicon MacOS. (#520)

This commit is contained in:
Xiuming Chen 2025-04-22 11:19:20 -07:00 committed by GitHub
parent 33ce337cd3
commit 23820f6255
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

9
build
View file

@ -211,14 +211,15 @@ fi
if [ -z "$PLATFORM" ]; then
# use system architecture if not specified
if [ "$(uname -m)" == "x86_64" ]; then
UNAME="$(uname -m)"
if [ "$UNAME" == "x86_64" ]; then
PLATFORM="linux/amd64"
elif [ "$(uname -m)" == "aarch64" ]; then
elif [ "$UNAME" == "aarch64" ] || [ "$UNAME" == "arm64" ]; then
PLATFORM="linux/arm64"
elif [ "$(uname -m)" == "armv7l" ]; then
elif [ "$UNAME" == "armv7l" ]; then
PLATFORM="linux/arm/v7"
else
log "Unknown architecture: $(uname -m)"
log "Unknown architecture: $UNAME"
exit 1
fi
fi