Codemagic se usa como herramienta de release (Play Store + App Store), no como CI general. La validación de develop / feature branches sigue siendo local. Workflows: - staging_android / staging_ios — push a fusion-app → Play Internal Track + TestFlight - production_android / production_ios — tag 1.0.0(N) → Play (draft) + App Store (manual review) Todos los workflows publicables buildean en APP_MODE=legacy mientras el roadmap premium de Treezor no esté listo para producción. Scripts en codemagic_scripts/: - project_setup.sh — melos bootstrap (build_runner no es necesario, los .freezed.dart y .g.dart están commiteados) - analyze_and_test.sh — melos run analyze + test con --no-select obligatorio (sin TTY melos crashea con StdinException) - android_dependencies.sh — verifica gradle wrapper - android_key_properties.sh — escribe key.properties desde CM_KEYSTORE_* - ios_signing_cocoapods.sh — gem install cocoapods + xcode-project use-profiles - flutter_build.sh — build aab/ipa con --dart-define=APP_MODE; parser para tags formato 1.0.0(N) o v1.0.0(N) en producción - print_versions.sh — log de versiones y herramientas - build_status.sh — exit + notificación Google Chat ante fallo Setup detallado y bloqueantes externos en docs/codemagic-integration.md.
23 lines
655 B
Bash
Executable File
23 lines
655 B
Bash
Executable File
#!/bin/bash
|
|
set -uo pipefail
|
|
|
|
APP_PLATFORM=$1
|
|
ENVIRONMENT=$2
|
|
|
|
if [ -f ~/SUCCESS ]; then
|
|
echo "Build finished successfully ($APP_PLATFORM / $ENVIRONMENT)"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Codemagic pipeline failed in $ENVIRONMENT workflow ($APP_PLATFORM)"
|
|
|
|
if [ -n "${GOOGLE_BUILDS_CHAT_URL:-}" ]; then
|
|
curl -fsS -X POST -H 'Content-Type: application/json' \
|
|
-d '{
|
|
"text": "*Codemagic* failed in '"$ENVIRONMENT"' / '"$APP_PLATFORM"' for commit '"$CM_COMMIT"' (build '"$BUILD_NUMBER"').\nBuild: https://codemagic.io/app/'"$CM_PROJECT_ID"'/build/'"$CM_BUILD_ID"'"
|
|
}' \
|
|
"$GOOGLE_BUILDS_CHAT_URL" || echo "(google chat webhook post failed)"
|
|
fi
|
|
|
|
exit 1
|