mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 20:43:10 +00:00
29 lines
519 B
Bash
Executable file
29 lines
519 B
Bash
Executable file
#!/bin/bash -e
|
|
#
|
|
# script/build
|
|
# mas
|
|
#
|
|
# Builds the Swift Package.
|
|
#
|
|
|
|
# Build for the host architecture by default.
|
|
ARCH=()
|
|
if [[ "$1" == '--universal' ]]; then
|
|
ARCH=(
|
|
--arch arm64
|
|
--arch x86_64
|
|
)
|
|
fi
|
|
|
|
# Disable the manifest cache on Xcode 12.5 and later.
|
|
CACHE=()
|
|
if [[ "$(swift build --help)" =~ manifest-cache ]]; then
|
|
CACHE=(--manifest-cache none)
|
|
fi
|
|
|
|
echo "==> 🏗️ Building mas ($(script/version))"
|
|
swift build \
|
|
--configuration release \
|
|
"${ARCH[@]}" \
|
|
--disable-sandbox \
|
|
"${CACHE[@]}"
|