mas/script/build
2018-01-26 19:51:01 -07:00

31 lines
580 B
Bash
Executable file

#!/bin/bash -e
main() {
script/clean
build
# If this is a tagged build we are going to release
if [[ ! -z $TRAVIS_TAG ]]; then
archive
fi
}
build() {
set -o pipefail && \
xcodebuild -project "mas-cli.xcodeproj" \
-scheme mas-cli \
-configuration Release \
clean build \
| bundle exec xcpretty --color
}
archive() {
set -o pipefail && \
xcodebuild -project "mas-cli.xcodeproj" \
-scheme mas-cli \
-archivePath mas.xcarchive \
archive \
| bundle exec xcpretty --color
}
main