add staging ios app build script

This commit is contained in:
Kevin
2026-05-20 10:27:40 +08:00
parent 0d417331fd
commit 81458c7046
14 changed files with 102 additions and 31 deletions

View File

@@ -33,9 +33,17 @@ esac
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
echo "==> Switching to .env.${ENV}"
echo "==> Switching to env/${ENV} → .env"
npm run use-env -- "$ENV"
# Release Archive 时 NODE_ENV=productionExpo 会加载根目录 .env.production 并覆盖 .env
for legacy in .env.production .env.staging .env.development; do
if [[ -f "$legacy" ]]; then
echo "::error::Found legacy $legacy — it overrides use-env on Release builds. Use app-expo/env/ templates only." >&2
exit 1
fi
done
echo "==> expo prebuild --platform ios --clean"
npx expo prebuild --platform ios --clean