mas/script/build

52 lines
1.1 KiB
Text
Raw Normal View History

#!/bin/bash -e
2015-09-19 22:43:03 +00:00
BUILD_DIR="$PWD/build"
WORKSPACE="mas-cli.xcworkspace"
SCHEME="mas-cli Release"
CONFIG="Release"
main() {
2015-09-20 10:23:36 +00:00
script/clean
xcodebuild -workspace "$WORKSPACE" \
-scheme "$SCHEME" \
-configuration "$CONFIG" \
clean
build
2015-12-30 21:45:36 +00:00
# If this is a tagged build we are going to release
if [[ ! -z $TRAVIS_TAG ]]; then
archive
fi
}
build() {
echo "==> 🏗️ Building"
2017-05-23 17:05:57 +00:00
set -o pipefail && \
xcodebuild -workspace "$WORKSPACE" \
-scheme "$SCHEME" \
-configuration "$CONFIG" \
OBJROOT="$BUILD_DIR/obj" \
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
SYMROOT="$BUILD_DIR/sym" \
build \
2018-01-27 02:51:01 +00:00
| bundle exec xcpretty --color
}
archive() {
echo "==> 📦 Archiving"
2017-05-23 17:05:57 +00:00
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" \
2017-05-23 17:05:57 +00:00
archive \
2018-01-27 02:51:01 +00:00
| bundle exec xcpretty --color
}
main