chore(build): Add debug symbols to release build (#1)
* chore(build): Add debug symbols to release build and make simulator build the Debug configuration * chore(build): Update build script to just checkout the version tag ahead of next capacitor release * chore(build): Remove now unused function
This commit is contained in:
parent
b5b34d78eb
commit
640291de3a
1 changed files with 16 additions and 6 deletions
22
build-cap
22
build-cap
|
|
@ -1,15 +1,12 @@
|
|||
#!/bin/bash -eoux pipefail
|
||||
|
||||
portals_dev_release_commit() {
|
||||
git log --oneline | grep -B 1 "Release $1" | head -n1 | sed 's/ /\n/g' | head -n1 | xargs git checkout
|
||||
}
|
||||
|
||||
build_capacitor_simulator() {
|
||||
xcodebuild archive \
|
||||
-scheme Capacitor \
|
||||
-workspace Capacitor.xcworkspace \
|
||||
-destination "generic/platform=iOS Simulator" \
|
||||
-archivePath ./Build/iOS-Simulator \
|
||||
-configuration Debug \
|
||||
SKIP_INSTALL=NO \
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
|
||||
}
|
||||
|
|
@ -21,9 +18,19 @@ build_capacitor_ios() {
|
|||
-destination "generic/platform=iOS" \
|
||||
-archivePath ./Build/iOS \
|
||||
SKIP_INSTALL=NO \
|
||||
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \
|
||||
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
|
||||
}
|
||||
|
||||
cap_bcsymbol() {
|
||||
echo -n $(dwarfdump -u $PWD/Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Capacitor | grep -Ewo '[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}')
|
||||
}
|
||||
|
||||
cordova_bcsymbol() {
|
||||
echo -n $(dwarfdump -u $PWD/Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework/Cordova | grep -Ewo '[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}')
|
||||
}
|
||||
|
||||
create_xcframeworks() {
|
||||
build_capacitor_simulator
|
||||
build_capacitor_ios
|
||||
|
|
@ -34,11 +41,15 @@ create_xcframeworks() {
|
|||
xcodebuild -create-xcframework \
|
||||
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/BCSymbolMaps/$(cap_bcsymbol).bcsymbolmap \
|
||||
-output Capacitor.xcframework
|
||||
|
||||
xcodebuild -create-xcframework \
|
||||
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/BCSymbolMaps/$(cordova_bcsymbol).bcsymbolmap \
|
||||
-output Cordova.xcframework
|
||||
|
||||
zip -r Capacitor.xcframework.zip Capacitor.xcframework
|
||||
|
|
@ -82,8 +93,7 @@ EOF
|
|||
|
||||
git clone https://github.com/ionic-team/capacitor capacitor-checkout
|
||||
cd capacitor-checkout/ios/Capacitor
|
||||
git checkout portals-dev
|
||||
portals_dev_release_commit $1
|
||||
git checkout $1
|
||||
|
||||
create_xcframeworks
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue