CI: Improve system architecture detection in build scripts

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2023-10-05 23:18:54 +02:00
parent 1e11d8986e
commit b45b20aa53
8 changed files with 29 additions and 15 deletions

View File

@@ -9,8 +9,14 @@ set -e
TF_VERSION=${TF_VERSION:-1.15.2}
SYSTEM_ARCH=$(uname -m)
DESTARCH=${DESTARCH:-$SYSTEM_ARCH}
# Determine the system architecture.
if [[ $PHOTOPRISM_ARCH ]]; then
SYSTEM_ARCH=$PHOTOPRISM_ARCH
else
SYSTEM_ARCH=$(uname -m)
fi
DESTARCH=${BUILD_ARCH:-$SYSTEM_ARCH}
case $DESTARCH in
amd64 | AMD64 | x86_64 | x86-64)