#!/bin/bash # PAILot full-store release pipeline. # Builds iOS IPA, uploads to App Store Connect, then builds Android AAB. # # Prereqs: # - Apple Dev Team 7KU642K5ZL provisioning set up (same as Glidr). # - App Store Connect API key at $HOME/.appstoreconnect/private_keys/AuthKey_*.p8 # - android/release.keystore present (generated once; back this up!). # # Usage: # ./tools/release.sh # iOS + Android # ./tools/release.sh --ios-only # skip Android # ./tools/release.sh --android-only # skip iOS set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" APP_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" cd "$APP_DIR" IOS=true ANDROID=true for arg in "$@"; do case "$arg" in --ios-only) ANDROID=false ;; --android-only) IOS=false ;; esac done # Kill any competing flutter/dart processes (other sessions hold locks). pkill -f "dartvm.*flutter_tools" 2>/dev/null || true sleep 1 APP_VERSION=$(grep "^version:" pubspec.yaml | sed 's/version: //') echo "=========================================" echo " PAILot store release v${APP_VERSION}" echo "=========================================" echo "" if $IOS; then echo "[iOS] Building IPA and uploading to App Store Connect..." bash tools/build-appstore.sh echo "" fi if $ANDROID; then echo "[Android] Building AAB..." bash tools/build-android-aab.sh echo "" fi echo "=========================================" echo " RELEASE COMPLETE" echo "=========================================" echo "" $IOS && echo "iOS: Uploaded to App Store Connect." $ANDROID && echo "Android: build/app/outputs/bundle/release/app-release.aab" $ANDROID && echo " Upload to Google Play Console manually." echo "" echo "Next: bump the build number on each store and submit for review."