update
This commit is contained in:
44
ios/bin/build.zsh
Executable file
44
ios/bin/build.zsh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/zsh
|
||||
set -e
|
||||
|
||||
d=~/ai/at/repos/social-app
|
||||
APP_NAME=Aiat
|
||||
PKG=aiat
|
||||
TEAM_NAME=
|
||||
TEAM_ID=
|
||||
CERT="Apple Distribution: ${TEAM_NAME} (${TEAM_ID})"
|
||||
MAIL=user@example.com
|
||||
KEY_CHAIN=EXAMPLE
|
||||
|
||||
cd $d
|
||||
# npx expo prebuild --clean
|
||||
# cd ios && pod install && cd ..
|
||||
|
||||
## アーカイブ
|
||||
xcodebuild -workspace ios/${PKG}.xcworkspace \
|
||||
-scheme ${PKG} \
|
||||
-configuration Release \
|
||||
-archivePath build/${APP_NAME}.xcarchive \
|
||||
-allowProvisioningUpdates \
|
||||
archive
|
||||
|
||||
cd build
|
||||
|
||||
# IPA作成
|
||||
rm -rf Payload ${APP_NAME}.ipa
|
||||
mkdir -p Payload
|
||||
cp -R ${APP_NAME}.xcarchive/Products/Applications/${PKG}.app Payload/
|
||||
cp ../store.mobileprovision Payload/${PKG}.app/embedded.mobileprovision
|
||||
|
||||
# entitlements抽出
|
||||
security cms -D -i Payload/${PKG}.app/embedded.mobileprovision > /tmp/profile.plist
|
||||
/usr/libexec/PlistBuddy -x -c "Print :Entitlements" /tmp/profile.plist > /tmp/entitlements.plist
|
||||
|
||||
codesign -f -s "$CERT" Payload/${PKG}.app/Frameworks/*.framework 2>/dev/null || true
|
||||
codesign -f -s "$CERT" --entitlements /tmp/entitlements.plist Payload/${PKG}.app
|
||||
|
||||
zip -r ${APP_NAME}.ipa Payload
|
||||
|
||||
xcrun altool --upload-app -f ${APP_NAME}.ipa -t ios -u "${MAIL}" -p "@keychain:${KEY_CHAIN}"
|
||||
|
||||
echo "Upload complete"
|
||||
Reference in New Issue
Block a user