2018-10-14 16:05:31 -06:00
|
|
|
#!/bin/bash -ex
|
2015-09-19 23:43:03 +01:00
|
|
|
|
2018-07-04 19:55:28 -06:00
|
|
|
BUILD_DIR="$PWD/build"
|
2018-09-05 09:44:50 +10:00
|
|
|
PROJECT="mas-cli.xcodeproj"
|
2018-07-04 19:55:28 -06:00
|
|
|
SCHEME="mas-cli Release"
|
|
|
|
CONFIG="Release"
|
|
|
|
|
2015-09-20 11:14:32 +01:00
|
|
|
main() {
|
2015-09-20 11:23:36 +01:00
|
|
|
script/clean
|
2018-10-14 16:05:31 -06:00
|
|
|
|
2018-09-05 09:45:01 +10:00
|
|
|
carthage build \
|
|
|
|
--platform macOS \
|
|
|
|
--cache-builds \
|
|
|
|
--configuration "$CONFIG"
|
2018-07-04 19:55:28 -06:00
|
|
|
|
2018-10-14 21:49:23 -06:00
|
|
|
archive
|
2015-09-20 11:14:32 +01:00
|
|
|
}
|
|
|
|
|
2018-10-14 21:49:23 -06:00
|
|
|
# OBJROOT - Intermediate Build Files Path
|
|
|
|
# The path where intermediate files will be placed during a build. Intermediate files include generated sources, object
|
|
|
|
# files, etc. Shell script build phases can place and access files here, as well. Typically this path is not set per
|
|
|
|
# target, but is set per project or per user. By default, this is set to `$(PROJECT_DIR)/build`.
|
|
|
|
|
|
|
|
# SHARED_PRECOMPS_DIR - Precompiled Headers Cache Path
|
|
|
|
# The path where precompiled prefix header files are placed during a build. Defaults to `$(OBJROOT)/SharedPrecompiledHeaders`.
|
|
|
|
# Using a common location allows precompiled headers to be shared between multiple projects.
|
|
|
|
|
|
|
|
# SYMROOT - Build Procucts Path
|
|
|
|
# The path at which all products will be placed when performing a build. Typically this path is not set per target,
|
|
|
|
# but is set per-project or per-user. By default, this is set to `$(PROJECT_DIR)/build`.
|
|
|
|
|
2015-09-20 11:14:32 +01:00
|
|
|
build() {
|
2018-07-04 19:55:28 -06:00
|
|
|
echo "==> 🏗️ Building"
|
2017-05-23 11:05:57 -06:00
|
|
|
set -o pipefail && \
|
2018-09-05 09:44:50 +10:00
|
|
|
xcodebuild -project "$PROJECT" \
|
2018-07-04 19:55:28 -06:00
|
|
|
-scheme "$SCHEME" \
|
|
|
|
-configuration "$CONFIG" \
|
2018-10-14 21:49:23 -06:00
|
|
|
OBJROOT="$BUILD_DIR" \
|
|
|
|
SYMROOT="$BUILD_DIR" \
|
2018-07-04 19:55:28 -06:00
|
|
|
build \
|
2018-01-26 19:51:01 -07:00
|
|
|
| bundle exec xcpretty --color
|
2015-09-20 11:14:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
archive() {
|
2018-07-04 19:55:28 -06:00
|
|
|
echo "==> 📦 Archiving"
|
2017-05-23 11:05:57 -06:00
|
|
|
set -o pipefail && \
|
2018-09-05 09:44:50 +10:00
|
|
|
xcodebuild -project "$PROJECT" \
|
2018-07-04 19:55:28 -06:00
|
|
|
-scheme "$SCHEME" \
|
|
|
|
-configuration "$CONFIG" \
|
|
|
|
-archivePath "$BUILD_DIR/mas.xcarchive" \
|
2018-10-14 21:49:23 -06:00
|
|
|
OBJROOT="$BUILD_DIR" \
|
|
|
|
SYMROOT="$BUILD_DIR" \
|
2017-05-23 11:05:57 -06:00
|
|
|
archive \
|
2018-01-26 19:51:01 -07:00
|
|
|
| bundle exec xcpretty --color
|
2015-09-20 11:14:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
main
|