forked from mozilla/application-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-carthage.sh
executable file
·34 lines (25 loc) · 985 Bytes
/
build-carthage.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -eu
CONFIGURATION="Release"
FRAMEWORK_NAME="MozillaAppServices.framework.zip"
ARCHIVE=true
while [[ "$#" -gt 0 ]]; do case $1 in
--configuration) CONFIGURATION="$2"; shift;shift;;
--out) FRAMEWORK_NAME="$2"; shift;shift;;
--no-archive) ARCHIVE=false; shift;;
*) echo "Unknown parameter: $1"; exit 1;
esac; done
set -vx
XCODE_XCCONFIG_FILE=$(pwd)/xcconfig/xcode-12-fix-carthage-lipo.xcconfig
export XCODE_XCCONFIG_FILE
carthage bootstrap --platform iOS --cache-builds
set -o pipefail && \
carthage build --no-skip-current --platform iOS --verbose --configuration "${CONFIGURATION}" --cache-builds | \
tee raw_xcodebuild.log | \
xcpretty
if [ "$ARCHIVE" = true ]; then
## When https://github.com/Carthage/Carthage/issues/2623 is fixed,
## carthage build --archive should work to produce a zip
# Exclude SwiftProtobuf.
zip -r "${FRAMEWORK_NAME}" Carthage/Build/iOS megazords/ios/DEPENDENCIES.md -x '*SwiftProtobuf.framework*/*'
fi