mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 11:33:13 +00:00
52 lines
1.2 KiB
Bash
Executable file
52 lines
1.2 KiB
Bash
Executable file
#!/bin/bash -e
|
|
|
|
BUILD_DIR="$PWD/build"
|
|
WORKSPACE="mas-cli.xcworkspace"
|
|
SCHEME="mas-cli Release"
|
|
CONFIG="Release"
|
|
|
|
main() {
|
|
script/clean
|
|
|
|
xcodebuild -workspace "$WORKSPACE" \
|
|
-scheme "$SCHEME" \
|
|
-configuration "$CONFIG" \
|
|
clean
|
|
|
|
build
|
|
|
|
# If this is a tagged build we are going to release
|
|
# TEMP: Generate archive on all builds
|
|
# if [[ ! -z $TRAVIS_TAG ]]; then
|
|
archive
|
|
# fi
|
|
}
|
|
|
|
build() {
|
|
echo "==> 🏗️ Building"
|
|
set -o pipefail && \
|
|
xcodebuild -workspace "$WORKSPACE" \
|
|
-scheme "$SCHEME" \
|
|
-configuration "$CONFIG" \
|
|
OBJROOT="$BUILD_DIR/obj" \
|
|
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
|
SYMROOT="$BUILD_DIR/sym" \
|
|
build \
|
|
| bundle exec xcpretty --color
|
|
}
|
|
|
|
archive() {
|
|
echo "==> 📦 Archiving"
|
|
set -o pipefail && \
|
|
xcodebuild -workspace "$WORKSPACE" \
|
|
-scheme "$SCHEME" \
|
|
-configuration "$CONFIG" \
|
|
-archivePath "$BUILD_DIR/mas.xcarchive" \
|
|
OBJROOT="$BUILD_DIR/obj" \
|
|
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
|
SYMROOT="$BUILD_DIR/sym" \
|
|
archive \
|
|
| bundle exec xcpretty --color
|
|
}
|
|
|
|
main
|