feat: Refactor Codemagic scripts for improved readability and maintainability
This commit is contained in:
@@ -1,37 +1,36 @@
|
||||
# Reusable script for building the Flutter app
|
||||
build-script: &build-script
|
||||
name: Build Flutter App
|
||||
script: |
|
||||
flutter pub get
|
||||
# Uncomment the line below if you use build_runner
|
||||
# flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
# Build Android
|
||||
flutter build appbundle --flavor $FLAVOR
|
||||
|
||||
# Build iOS
|
||||
flutter build ipa --flavor $FLAVOR --export-options-plist=$FCI_BUILD_DIR/mobile-apps/client-app/ios/exportOptions.plist
|
||||
|
||||
# Reusable script for distributing to Firebase
|
||||
distribute-script: &distribute-script
|
||||
name: Distribute to Firebase App Distribution
|
||||
script: |
|
||||
# Distribute Android
|
||||
firebase appdistribution:distribute "build/app/outputs/bundle/${FLAVOR}Release/app-${FLAVOR}-release.aab" \
|
||||
--app $FIREBASE_APP_ID_ANDROID \
|
||||
--release-notes "Build $FCI_BUILD_NUMBE R" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# Distribute iOS
|
||||
firebase appdistribution:distribute "build/ios/ipa/app.ipa" \
|
||||
--app $FIREBASE_APP_ID_IOS \
|
||||
--release-notes "Build $FCI_BUILD_NUMBE R" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
workflows:
|
||||
# =================================================================================
|
||||
# Reusable Scripts
|
||||
# =================================================================================
|
||||
build-script: &build-script
|
||||
name: Build Flutter App
|
||||
script: |
|
||||
flutter pub get
|
||||
# Uncomment the line below if you use build_runner
|
||||
# flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
# Build Android
|
||||
flutter build appbundle --flavor $FLAVOR
|
||||
|
||||
# Build iOS
|
||||
flutter build ipa --flavor $FLAVOR --export-options-plist=$FCI_BUILD_DIR/mobile-apps/client-app/ios/exportOptions.plist
|
||||
|
||||
distribute-script: &distribute-script
|
||||
name: Distribute to Firebase App Distribution
|
||||
script: |
|
||||
# Distribute Android
|
||||
firebase appdistribution:distribute "build/app/outputs/bundle/${FLAVOR}Release/app-${FLAVOR}-release.aab" \
|
||||
--app $FIREBASE_APP_ID_ANDROID \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# Distribute iOS
|
||||
firebase appdistribution:distribute "build/ios/ipa/app.ipa" \
|
||||
--app $FIREBASE_APP_ID_IOS \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# =================================================================================
|
||||
# Base workflow for client_app
|
||||
# =================================================================================
|
||||
|
||||
Reference in New Issue
Block a user