PulseCanvas / app · pulsecanvas.ai / scripts / store-release.sh
| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | cd "$(dirname "$0")/.." |
| 4 | action="${1:-help}" |
| 5 | out="$PWD/build/app-store" |
| 6 | mkdir -p "$out" |
| 7 | case "$action" in |
| 8 | test) |
| 9 | xcodebuild -project PulseCanvas.xcodeproj -scheme PulseCanvas -configuration Release \ |
| 10 | -derivedDataPath .build/store-test PRODUCT_BUNDLE_IDENTIFIER=com.protomota.pulsecanvas.storevalidation \ |
| 11 | CODE_SIGN_IDENTITY="Apple Development" CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM=22HV69L32T build |
| 12 | python3 scripts/validate-store-artifact.py --local '.build/store-test/Build/Products/Release/PulseCanvas Studio.app' |
| 13 | ;; |
| 14 | archive-unsigned) |
| 15 | # Engineering reference only. This archive cannot be uploaded or installed as a signed release. |
| 16 | xcodebuild -project PulseCanvas.xcodeproj -scheme PulseCanvas -configuration Release \ |
| 17 | -derivedDataPath .build/store-archive -archivePath "$out/PulseCanvas-Unsigned.xcarchive" \ |
| 18 | CODE_SIGNING_ALLOWED=NO archive |
| 19 | ;; |
| 20 | archive) |
| 21 | if [[ "${BUNDLE_ID_CONFIRMED:-}" != com.protomota.pulsecanvas ]]; then |
| 22 | echo 'Verify/register com.protomota.pulsecanvas in team 22HV69L32T, then set BUNDLE_ID_CONFIRMED=com.protomota.pulsecanvas.' >&2 |
| 23 | exit 1 |
| 24 | fi |
| 25 | # Existing Xcode account/profile required. Do not create credentials implicitly. |
| 26 | xcodebuild -project PulseCanvas.xcodeproj -scheme PulseCanvas -configuration Release \ |
| 27 | -derivedDataPath .build/store-archive -archivePath "$out/PulseCanvas.xcarchive" archive |
| 28 | python3 scripts/validate-store-artifact.py --archive "$out/PulseCanvas.xcarchive/Products/Applications/PulseCanvas Studio.app" |
| 29 | ;; |
| 30 | export) |
| 31 | xcodebuild -exportArchive -archivePath "$out/PulseCanvas.xcarchive" \ |
| 32 | -exportOptionsPlist macOS/ExportOptions.plist -exportPath "$out/export" |
| 33 | ;; |
| 34 | *) |
| 35 | echo 'Usage: scripts/store-release.sh test | archive-unsigned | archive | export' |
| 36 | echo 'Upload with Xcode Organizer: Distribute App → App Store Connect → Upload.' |
| 37 | echo 'See docs/app-store/README.md for release holds and account setup.' |
| 38 | ;; |
| 39 | esac |