iOS: dev build variant (org.cdnutter.stemify-dev) for internal tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f2dcb94f5
commit
d996d3e236
5 files changed
+32
-12
No files matched your search
@@ -3,31 +3,43 @@
|
||||
# With prov/Stemify.mobileprovision, prov/key.p12 and P12_PASS set, it also writes a signed
|
||||
# build/prov/stemify-<version>-signed.ipa (keeps CarPlay/Siri) for the owner's own device.
|
||||
# Finished IPAs are kept per version; build/work is scratch and is wiped each run.
|
||||
# "build-ipa.sh dev" builds only build/dev/stemify-<version>-dev.ipa: bundle id org.cdnutter.stemify-dev,
|
||||
# named "Stemify Dev", ad-hoc signed, so it installs next to the release app. For internal tests, never released.
|
||||
# ios/scripts/build-remote.sh runs this on White-M1 and copies build/public and build/prov back to DevOps.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
export PATH=/opt/homebrew/bin:$PATH
|
||||
B=build; OUT=$B/work; APP=$OUT/Payload/Stemify.app; EXT=$APP/PlugIns/StemifyWidgets.appex
|
||||
rm -rf $OUT && mkdir -p $OUT/Payload $B/public $B/prov
|
||||
MODE=${1:-release}
|
||||
if [ "$MODE" = dev ]; then APP_ID=org.cdnutter.stemify-dev; APP_NAME="Stemify Dev"; DD=$B/dd-dev
|
||||
else APP_ID=org.cdnutter.stemify; APP_NAME=Stemify; DD=$B/dd; fi
|
||||
rm -rf $OUT && mkdir -p $OUT/Payload $B/public $B/prov $B/dev
|
||||
# "1.0 RC 1" -> 1.0-rc1, used in file names and release tags.
|
||||
VERSION=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ rc /-rc/; s/ /-/g')
|
||||
|
||||
# xcodebuild compiles the app, the widget extension, the asset catalog and the App Intents metadata.
|
||||
xcodegen generate -q
|
||||
xcodebuild -project Stemify.xcodeproj -scheme Stemify -configuration Release -sdk iphoneos \
|
||||
-destination generic/platform=iOS -derivedDataPath $B/dd CODE_SIGNING_ALLOWED=NO -quiet build
|
||||
cp -R $B/dd/Build/Products/Release-iphoneos/Stemify.app $APP
|
||||
-destination generic/platform=iOS -derivedDataPath $DD APP_ID=$APP_ID APP_NAME="$APP_NAME" CODE_SIGNING_ALLOWED=NO -quiet build
|
||||
cp -R $DD/Build/Products/Release-iphoneos/Stemify.app $APP
|
||||
[ -d $EXT ] || { echo "widget extension missing" >&2; exit 1; }
|
||||
|
||||
# Ad-hoc signature carrying only the App Group, so Sideloadly/AltStore keep the widgets' shared data when re-signing.
|
||||
cat > $OUT/group.plist <<PL
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict><key>com.apple.security.application-groups</key><array><string>group.org.cdnutter.stemify</string></array></dict></plist>
|
||||
<plist version="1.0"><dict><key>com.apple.security.application-groups</key><array><string>group.$APP_ID</string></array></dict></plist>
|
||||
PL
|
||||
codesign -f -s - --entitlements $OUT/group.plist $EXT
|
||||
codesign -f -s - --entitlements $OUT/group.plist $APP
|
||||
|
||||
if [ "$MODE" = dev ]; then
|
||||
rm -f $B/dev/stemify-$VERSION-dev.ipa
|
||||
(cd $OUT && zip -qry ../dev/stemify-$VERSION-dev.ipa Payload)
|
||||
echo "$B/dev/stemify-$VERSION-dev.ipa"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Public build, for the releases and AltStore/Sideloadly.
|
||||
rm -f $B/public/stemify-$VERSION.ipa
|
||||
(cd $OUT && zip -qry ../public/stemify-$VERSION.ipa Payload)
|
||||
|
||||
Reference in new issue
Block a user