mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 20:48:30 +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 \
|
--cache-builds \
|
||||||
--configuration "$CONFIG"
|
--configuration "$CONFIG"
|
||||||
|
|
||||||
build
|
archive
|
||||||
|
|
||||||
# If this is a tagged build we are going to release
|
# If this is a tagged build we are going to release
|
||||||
# TEMP: Generate archive on all builds
|
# TEMP: Generate archive on all builds
|
||||||
# if [[ ! -z $TRAVIS_TAG ]]; then
|
# if [[ ! -z $TRAVIS_TAG ]]; then
|
||||||
archive
|
# archive
|
||||||
# fi
|
# 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() {
|
build() {
|
||||||
echo "==> 🏗️ Building"
|
echo "==> 🏗️ Building"
|
||||||
set -o pipefail && \
|
set -o pipefail && \
|
||||||
xcodebuild -project "$PROJECT" \
|
xcodebuild -project "$PROJECT" \
|
||||||
-scheme "$SCHEME" \
|
-scheme "$SCHEME" \
|
||||||
-configuration "$CONFIG" \
|
-configuration "$CONFIG" \
|
||||||
OBJROOT="$BUILD_DIR/obj" \
|
OBJROOT="$BUILD_DIR" \
|
||||||
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
SYMROOT="$BUILD_DIR" \
|
||||||
SYMROOT="$BUILD_DIR/sym" \
|
|
||||||
build \
|
build \
|
||||||
| bundle exec xcpretty --color
|
| bundle exec xcpretty --color
|
||||||
}
|
}
|
||||||
|
@ -42,9 +54,8 @@ archive() {
|
||||||
-scheme "$SCHEME" \
|
-scheme "$SCHEME" \
|
||||||
-configuration "$CONFIG" \
|
-configuration "$CONFIG" \
|
||||||
-archivePath "$BUILD_DIR/mas.xcarchive" \
|
-archivePath "$BUILD_DIR/mas.xcarchive" \
|
||||||
OBJROOT="$BUILD_DIR/obj" \
|
OBJROOT="$BUILD_DIR" \
|
||||||
SHARED_PRECOMPS_DIR="$OBJROOT/SharedPrecompiledHeaders" \
|
SYMROOT="$BUILD_DIR" \
|
||||||
SYMROOT="$BUILD_DIR/sym" \
|
|
||||||
archive \
|
archive \
|
||||||
| bundle exec xcpretty --color
|
| bundle exec xcpretty --color
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
BUILD_DIR=build
|
pushd 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/
|
|
||||||
|
|
||||||
echo "==> 🗜️ Compressing mas.xcarchive"
|
echo "==> 🗜️ Compressing mas.xcarchive"
|
||||||
zip -r mas.xcarchive.zip mas.xcarchive
|
zip -r mas.xcarchive.zip mas.xcarchive
|
||||||
|
|
||||||
echo "==> ️🗜️ Compressing binary"
|
echo "==> ️🗜️ Compressing binary and framework"
|
||||||
zip -j mas-cli.zip mas.xcarchive/Products/build/mas
|
pushd mas.xcarchive/Products/build
|
||||||
|
zip -r mas-cli.zip mas MasKit.framework
|
||||||
|
mv mas-cli.zip ../../../
|
||||||
|
popd
|
||||||
|
|
||||||
echo -n "==> 🔢 SHA256: "
|
echo -n "==> 🔢 SHA256: "
|
||||||
shasum -a 256 mas-cli.zip
|
shasum -a 256 mas-cli.zip
|
||||||
|
|
Loading…
Add table
Reference in a new issue