Files
stemify/ios/scripts/build-remote.sh
T
2026-11-09 17:09:10 -08:00

24 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Run from DevOps: syncs ios/ to White-M1, builds there, and pulls the IPAs back into ios/build.
# build-remote.sh dev + prov (the usual build): build/dev and build/prov
# build-remote.sh public public + prov, only when a public release is asked for: build/public and build/prov
# build-remote.sh dev dev only
set -euo pipefail
cd "$(dirname "$0")/.."
H=${BUILD_HOST:-white-m1}; R=stemify-build/ios
case "${1:-}" in
"") MODES="dev prov" ;;
public) MODES="release" ;;
dev) MODES="dev" ;;
*) echo "usage: $0 [public|dev]" >&2; exit 1 ;;
esac
rsync -a --exclude build --exclude prov --exclude Stemify.xcodeproj ./ $H:$R/
for m in $MODES; do
ssh $H "cd $R && P12_PASS=\$(cat prov/cert_pass.txt 2>/dev/null) bash scripts/build-ipa.sh $m"
done
for m in $MODES; do
case $m in dev) DIRS=dev ;; prov) DIRS=prov ;; release) DIRS="public prov" ;; esac
for d in $DIRS; do mkdir -p build/$d; rsync -a $H:$R/build/$d/ build/$d/; done
done
ls build/*/stemify-$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ rc /-rc/; s/ /-/g')*.ipa 2>/dev/null