2015-09-20 10:14:32 +00:00
|
|
|
#!/bin/bash -e
|
2015-09-19 22:43:03 +00:00
|
|
|
|
2015-09-20 10:14:32 +00:00
|
|
|
main() {
|
2015-09-20 10:23:36 +00:00
|
|
|
script/clean
|
2015-09-20 10:14:32 +00:00
|
|
|
build
|
|
|
|
|
2015-12-30 21:45:36 +00:00
|
|
|
# If this is a tagged build we are going to release
|
2015-09-20 10:14:32 +00:00
|
|
|
if [[ ! -z $TRAVIS_TAG ]]; then
|
|
|
|
archive
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2017-05-23 17:05:57 +00:00
|
|
|
set -o pipefail && \
|
2018-07-05 00:25:59 +00:00
|
|
|
xcodebuild -workspace "mas-cli.xcworkspace" \
|
2018-02-17 21:17:11 +00:00
|
|
|
-scheme "mas-cli Release" \
|
2017-05-23 17:05:57 +00:00
|
|
|
-configuration Release \
|
|
|
|
clean build \
|
2018-01-27 02:51:01 +00:00
|
|
|
| bundle exec xcpretty --color
|
2015-09-20 10:14:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
archive() {
|
2017-05-23 17:05:57 +00:00
|
|
|
set -o pipefail && \
|
2018-07-05 00:25:59 +00:00
|
|
|
xcodebuild -workspace "mas-cli.xcworkspace" \
|
2018-02-17 21:17:11 +00:00
|
|
|
-scheme "mas-cli Release" \
|
2017-05-23 17:05:57 +00:00
|
|
|
-archivePath mas.xcarchive \
|
|
|
|
archive \
|
2018-01-27 02:51:01 +00:00
|
|
|
| bundle exec xcpretty --color
|
2015-09-20 10:14:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main
|