Matthias Nott
2026-07-07 d4d2fae4fd8699fac61a80905b7efbb594db03a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/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."