Only set bash variables once.

Partial #638

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-11-16 02:43:50 -05:00
parent 8338d0b5de
commit 602131df1d
No known key found for this signature in database

View file

@ -14,18 +14,20 @@ if ! cd -- "${mas_dir}"; then
fi
# Build for the host architecture by default.
ARCH=()
if [[ "${#}" -ge 1 && "${1}" == '--universal' ]]; then
ARCH=(
--arch arm64
--arch x86_64
)
else
ARCH=()
fi
# Disable the manifest cache.
CACHE=()
if [[ "$(swift build --help)" =~ manifest-cache ]]; then
CACHE=(--manifest-cache none)
else
CACHE=()
fi
echo "==> 🏗️ Building mas ($(script/version --write))"