mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
📜 Update build scripts to include MasKit
This commit is contained in:
parent
c52122e7fb
commit
189240a752
2 changed files with 25 additions and 18 deletions
27
script/build
27
script/build
|
@ -13,24 +13,36 @@ main() {
|
|||
--cache-builds \
|
||||
--configuration "$CONFIG"
|
||||
|
||||
build
|
||||
archive
|
||||
|
||||
# If this is a tagged build we are going to release
|
||||
# TEMP: Generate archive on all builds
|
||||
# if [[ ! -z $TRAVIS_TAG ]]; then
|
||||
archive
|
||||
# archive
|
||||
# fi
|
||||
}
|
||||
|
||||
# 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`.
|
||||
|
||||
build() {
|
||||
echo "==> 🏗️ Building"
|
||||
set -o pipefail && \
|
||||
xcodebuild -project "$PROJECT" \
|
||||
-scheme "$SCHEME" \
|
||||
-configuration "$CONFIG" \
|
||||
OBJROOT="$BUILD_DIR/obj" \
|
||||
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
||||
SYMROOT="$BUILD_DIR/sym" \
|
||||
OBJROOT="$BUILD_DIR" \
|
||||
SYMROOT="$BUILD_DIR" \
|
||||
build \
|
||||
| bundle exec xcpretty --color
|
||||
}
|
||||
|
@ -42,9 +54,8 @@ archive() {
|
|||
-scheme "$SCHEME" \
|
||||
-configuration "$CONFIG" \
|
||||
-archivePath "$BUILD_DIR/mas.xcarchive" \
|
||||
OBJROOT="$BUILD_DIR/obj" \
|
||||
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
||||
SYMROOT="$BUILD_DIR/sym" \
|
||||
OBJROOT="$BUILD_DIR" \
|
||||
SYMROOT="$BUILD_DIR" \
|
||||
archive \
|
||||
| bundle exec xcpretty --color
|
||||
}
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
BUILD_DIR=build
|
||||
SYM_DIR=sym/Release
|
||||
|
||||
pushd $BUILD_DIR
|
||||
|
||||
echo "==> 🚚 Moving dSYM to xcarchive"
|
||||
mkdir -p mas.xcarchive/dSYMs/
|
||||
mv $SYM_DIR/mas.dSYM mas.xcarchive/dSYMs/
|
||||
pushd build
|
||||
|
||||
echo "==> 🗜️ Compressing mas.xcarchive"
|
||||
zip -r mas.xcarchive.zip mas.xcarchive
|
||||
|
||||
echo "==> ️🗜️ Compressing binary"
|
||||
zip -j mas-cli.zip mas.xcarchive/Products/build/mas
|
||||
echo "==> ️🗜️ Compressing binary and framework"
|
||||
pushd mas.xcarchive/Products/build
|
||||
zip -r mas-cli.zip mas MasKit.framework
|
||||
mv mas-cli.zip ../../../
|
||||
popd
|
||||
|
||||
echo -n "==> 🔢 SHA256: "
|
||||
shasum -a 256 mas-cli.zip
|
||||
|
|
Loading…
Reference in a new issue