From 115672fee65d63947fcdfc9640a5b0cc1b4c0586 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 20:26:57 +0100 Subject: [PATCH 01/45] Add codemagic yaml workflow file --- recipients_app/codemagic.yaml | 485 ++++++++++++++++++++++++++++++++++ 1 file changed, 485 insertions(+) create mode 100644 recipients_app/codemagic.yaml diff --git a/recipients_app/codemagic.yaml b/recipients_app/codemagic.yaml new file mode 100644 index 000000000..5c6741f9f --- /dev/null +++ b/recipients_app/codemagic.yaml @@ -0,0 +1,485 @@ +definitions: + instance_mac_mini_m2: &instance_mac_mini_m2 + instance_type: mac_mini_m2 + max_build_duration: 30 + + env_versions: &env_versions + flutter: 3.22.3 + xcode: 15.4 + cocoapods: default + + scripts: + - &verify_flutter_version + name: Verify Flutter version + script: | + # Verify Flutter version + echo "Verify Flutter version..." + REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') + CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') + if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then + echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" + exit 1 + else + echo "Required version: $REQUIRED_VERSION == Current version: $CURRENT_VERSION" + echo "Flutter version is correct" + fi + +workflows: + android-staging-firebase-app-distribution-workflow: + name: Android Staging (Firebase App Distribution) + <<: *instance_mac_mini_m2 + + environment: + android_signing: + - social_income_upload_keystore.jks + groups: + - slack + - app-config-stage + - firebase + #- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS) + << : *env_versions + + cache: + cache_paths: + - $HOME/.gradle/caches + - $FLUTTER_ROOT/.pub-cache + + scripts: + - name: Print environment variables + script: | + #!/bin/sh + set -ex + printenv + - name: Set up key.properties + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + cat >> "$CM_BUILD_DIR/recipients_app/android/key.properties" < $GOOGLE_APPLICATION_CREDENTIALS + # Define reusable section 'verify_flutter_version' + - *verify_flutter_version + - name: Get Flutter packages + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + flutter packages pub get + - name: Build AAB with Flutter + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + # Build the Flutter APK app + flutter build apk --release \ + --flavor stage \ + -t lib/main.dart \ + --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ + --dart-define=SENTRY_URL=$SENTRY_URL + working_directory: recipients_app + + artifacts: + - build/**/outputs/**/*.apk + - build/**/outputs/**/*.aab + - build/**/outputs/**/mapping.txt + - flutter_drive.log + + publishing: + #google_play: + # credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS + # track: internal + # submit_as_draft: true + firebase: + firebase_service_account: $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT + android: + app_id: 1:51495651779:android:08ef862a962bc041185576 + groups: + - internal-testers + artifact_type: 'apk' + + # Notifications + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails + + android-production-workflow: + name: Android Production + <<: *instance_mac_mini_m2 + + environment: + android_signing: + - social_income_upload_keystore.jks + groups: + - slack + - app-config-prod + #- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS) + << : *env_versions + + cache: + cache_paths: + - $HOME/.gradle/caches + - $FLUTTER_ROOT/.pub-cache + + scripts: + - name: Print environment variables + script: | + #!/bin/sh + set -ex + printenv + - name: Set up key.properties + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + cat >> "$CM_BUILD_DIR/recipients_app/android/key.properties" < google-services.json + - *verify_flutter_version + - name: Get Flutter packages + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + flutter packages pub get + - name: Build AAB with Flutter + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + # Build the Flutter AAB app + flutter build appbundle --release \ + --flavor prod \ + -t lib/main.dart \ + --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ + --dart-define=SENTRY_URL=$SENTRY_URL + working_directory: recipients_app + + artifacts: + - build/**/outputs/**/*.apk + - build/**/outputs/**/*.aab + - build/**/outputs/**/mapping.txt + - flutter_drive.log + + publishing: + #google_play: + # credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS + # track: internal + # submit_as_draft: true + + # Notifications + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails + + ios-staging-testflight-workflow: + name: iOS Staging (Test Flight) + <<: *instance_mac_mini_m2 + + integrations: + app_store_connect: Social Income Recipient App + + environment: + ios_signing: + distribution_type: app_store + bundle_identifier: org.socialincome.app.stage + groups: + - slack + - app-config-stage + vars: + APP_ID: 6464113329 # Apple ID of App "Stage Social Income" + << : *env_versions + + cache: + cache_paths: + - $FLUTTER_ROOT/.pub-cache + - $HOME/Library/Caches/CocoaPods + + scripts: + - name: Print environment variables + script: | + #!/bin/sh + set -ex + printenv + - name: Set up code signing settings on Xcode project + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + xcode-project use-profiles + - *verify_flutter_version + - name: Get Flutter packages + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + flutter packages pub get + - name: Install pods + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + find . -name "Podfile" -execdir pod install \; + - name: Flutter build ipa + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + # Build the Flutter iOS app + flutter build ipa --release \ + --flavor stage \ + -t lib/main.dart \ + --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ + --dart-define=SENTRY_URL=$SENTRY_URL + working_directory: recipients_app + + artifacts: + - build/ios/ipa/*.ipa + - /tmp/xcodebuild_logs/*.log + - flutter_drive.log + + publishing: + # Publish to Apple's Testflight via AppStore Connect + app_store_connect: + # Use referenced App Store Connect API key from above to authenticate binary upload + auth: integration + # Whether or not to submit the uploaded build to TestFlight beta review. + # Note: This action is performed during post-processing. + submit_to_testflight: true + + # Notifications + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails + + ios-staging-firebase-app-distribution-workflow: + name: iOS Staging (Firebase App Distribution) + <<: *instance_mac_mini_m2 + + integrations: + app_store_connect: Social Income Recipient App + + environment: + ios_signing: + distribution_type: ad_hoc + bundle_identifier: org.socialincome.app.stage + groups: + - slack + - app-config-stage + - firebase + vars: + APP_ID: 6464113329 # Apple ID of App "Stage Social Income" + << : *env_versions + + cache: + cache_paths: + - $FLUTTER_ROOT/.pub-cache + - $HOME/Library/Caches/CocoaPods + + scripts: + - name: Print environment variables + script: | + #!/bin/sh + set -ex + printenv + - name: Set up code signing settings on Xcode project + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + xcode-project use-profiles + - *verify_flutter_version + - name: Get Flutter packages + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + flutter packages pub get + - name: Install pods + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + find . -name "Podfile" -execdir pod install \; + - name: Flutter build ipa + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + # Build the Flutter iOS app + flutter build ipa --release \ + --flavor stage \ + -t lib/main.dart \ + --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ + --dart-define=SENTRY_URL=$SENTRY_URL + working_directory: recipients_app + + artifacts: + - build/ios/ipa/*.ipa + - /tmp/xcodebuild_logs/*.log + - flutter_drive.log + + publishing: + # Publish to Firebase App Distribution + firebase: + firebase_service_account: $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT + ios: + app_id: 1:51495651779:ios:d4d28e75065983fb185576 + groups: + - internal-testers + + # Notifications + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails + + ios-production-workflow: + name: iOS Production + <<: *instance_mac_mini_m2 + + integrations: + app_store_connect: Social Income Recipient App + + environment: + ios_signing: + distribution_type: app_store + bundle_identifier: org.socialincome.app + groups: + - slack + - app-config-prod + vars: + APP_ID: 6444860109 # Apple ID of Prod App "Social Income" + << : *env_versions + + cache: + cache_paths: + - $FLUTTER_ROOT/.pub-cache + - $HOME/Library/Caches/CocoaPods + + scripts: + - name: Print environment variables + script: | + #!/bin/sh + set -ex + printenv + - name: Load Prod Firebase configuration + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + cd $CM_BUILD_DIR/recipients_app/ios/GoogleServicesConfig + echo $IOS_FIREBASE_SECRET > GoogleService-Info-Prod.plist + - name: Set up code signing settings on Xcode project + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + xcode-project use-profiles + - *verify_flutter_version + - name: Get Flutter packages + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + flutter packages pub get + - name: Install pods + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + find . -name "Podfile" -execdir pod install \; + - name: Flutter build ipa + script: | + #!/usr/bin/env sh + set -e # exit on first failed command + + # Build the Flutter iOS app + flutter build ipa --release \ + --flavor prod \ + -t lib/main.dart \ + --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ + --dart-define=SENTRY_URL=$SENTRY_URL + working_directory: recipients_app + + artifacts: + - build/ios/ipa/*.ipa + - /tmp/xcodebuild_logs/*.log + - flutter_drive.log + + publishing: + # Publish to Apple's Testflight via AppStore Connect + app_store_connect: + # Use referenced App Store Connect API key from above to authenticate binary upload + auth: integration + # Whether or not to submit the uploaded build to TestFlight beta review. + # Note: This action is performed during post-processing. + submit_to_testflight: true + + # Notifications + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails From 9a5bb3a2fd671554188b607452901eb686b79290 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 20:32:11 +0100 Subject: [PATCH 02/45] Move codemagic.yaml to the root of the repository where it must be --- recipients_app/codemagic.yaml => codemagic.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipients_app/codemagic.yaml => codemagic.yaml (100%) diff --git a/recipients_app/codemagic.yaml b/codemagic.yaml similarity index 100% rename from recipients_app/codemagic.yaml rename to codemagic.yaml From e3572c2568de603be9c0b1be09b6e1f448277783 Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Mon, 6 Jan 2025 19:34:11 +0000 Subject: [PATCH 03/45] Prettified Code! --- codemagic.yaml | 124 ++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 5c6741f9f..af1a5c592 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1,17 +1,17 @@ -definitions: +definitions: instance_mac_mini_m2: &instance_mac_mini_m2 instance_type: mac_mini_m2 max_build_duration: 30 env_versions: &env_versions flutter: 3.22.3 - xcode: 15.4 + xcode: 15.4 cocoapods: default scripts: - - &verify_flutter_version + - &verify_flutter_version name: Verify Flutter version - script: | + script: | # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') @@ -28,7 +28,7 @@ workflows: android-staging-firebase-app-distribution-workflow: name: Android Staging (Firebase App Distribution) <<: *instance_mac_mini_m2 - + environment: android_signing: - social_income_upload_keystore.jks @@ -37,8 +37,8 @@ workflows: - app-config-stage - firebase #- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS) - << : *env_versions - + <<: *env_versions + cache: cache_paths: - $HOME/.gradle/caches @@ -46,12 +46,12 @@ workflows: scripts: - name: Print environment variables - script: | + script: | #!/bin/sh set -ex printenv - name: Set up key.properties - script: | + script: | #!/usr/bin/env sh set -e # exit on first failed command @@ -62,7 +62,7 @@ workflows: storeFile=$CM_KEYSTORE_PATH EOF # - name: Decode Google credentials - # script: | + # script: | # echo $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT > $GOOGLE_APPLICATION_CREDENTIALS # Define reusable section 'verify_flutter_version' - *verify_flutter_version @@ -70,13 +70,13 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter packages pub get - name: Build AAB with Flutter script: | #!/usr/bin/env sh set -e # exit on first failed command - + # Build the Flutter APK app flutter build apk --release \ --flavor stage \ @@ -100,10 +100,10 @@ workflows: firebase_service_account: $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT android: app_id: 1:51495651779:android:08ef862a962bc041185576 - groups: + groups: - internal-testers - artifact_type: 'apk' - + artifact_type: "apk" + # Notifications email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email recipients: @@ -121,7 +121,7 @@ workflows: android-production-workflow: name: Android Production <<: *instance_mac_mini_m2 - + environment: android_signing: - social_income_upload_keystore.jks @@ -129,8 +129,8 @@ workflows: - slack - app-config-prod #- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS) - << : *env_versions - + <<: *env_versions + cache: cache_paths: - $HOME/.gradle/caches @@ -138,12 +138,12 @@ workflows: scripts: - name: Print environment variables - script: | + script: | #!/bin/sh set -ex printenv - name: Set up key.properties - script: | + script: | #!/usr/bin/env sh set -e # exit on first failed command @@ -154,7 +154,7 @@ workflows: storeFile=$CM_KEYSTORE_PATH EOF - name: Load Firebase configuration - script: | + script: | #!/usr/bin/env sh set -e # exit on first failed command @@ -168,13 +168,13 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter packages pub get - name: Build AAB with Flutter script: | #!/usr/bin/env sh set -e # exit on first failed command - + # Build the Flutter AAB app flutter build appbundle --release \ --flavor prod \ @@ -194,7 +194,7 @@ workflows: # credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS # track: internal # submit_as_draft: true - + # Notifications email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email recipients: @@ -208,14 +208,14 @@ workflows: notify: success: true # To receive a notification when a build succeeds failure: true # To not receive a notification when a build fails - + ios-staging-testflight-workflow: name: iOS Staging (Test Flight) <<: *instance_mac_mini_m2 - + integrations: app_store_connect: Social Income Recipient App - + environment: ios_signing: distribution_type: app_store @@ -225,16 +225,16 @@ workflows: - app-config-stage vars: APP_ID: 6464113329 # Apple ID of App "Stage Social Income" - << : *env_versions - + <<: *env_versions + cache: cache_paths: - $FLUTTER_ROOT/.pub-cache - $HOME/Library/Caches/CocoaPods - + scripts: - name: Print environment variables - script: | + script: | #!/bin/sh set -ex printenv @@ -242,26 +242,26 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + xcode-project use-profiles - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter packages pub get - name: Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command - + find . -name "Podfile" -execdir pod install \; - name: Flutter build ipa script: | #!/usr/bin/env sh set -e # exit on first failed command - + # Build the Flutter iOS app flutter build ipa --release \ --flavor stage \ @@ -279,11 +279,11 @@ workflows: # Publish to Apple's Testflight via AppStore Connect app_store_connect: # Use referenced App Store Connect API key from above to authenticate binary upload - auth: integration + auth: integration # Whether or not to submit the uploaded build to TestFlight beta review. # Note: This action is performed during post-processing. submit_to_testflight: true - + # Notifications email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email recipients: @@ -301,10 +301,10 @@ workflows: ios-staging-firebase-app-distribution-workflow: name: iOS Staging (Firebase App Distribution) <<: *instance_mac_mini_m2 - + integrations: app_store_connect: Social Income Recipient App - + environment: ios_signing: distribution_type: ad_hoc @@ -315,16 +315,16 @@ workflows: - firebase vars: APP_ID: 6464113329 # Apple ID of App "Stage Social Income" - << : *env_versions - + <<: *env_versions + cache: cache_paths: - $FLUTTER_ROOT/.pub-cache - $HOME/Library/Caches/CocoaPods - + scripts: - name: Print environment variables - script: | + script: | #!/bin/sh set -ex printenv @@ -332,26 +332,26 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + xcode-project use-profiles - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter packages pub get - name: Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command - + find . -name "Podfile" -execdir pod install \; - name: Flutter build ipa script: | #!/usr/bin/env sh set -e # exit on first failed command - + # Build the Flutter iOS app flutter build ipa --release \ --flavor stage \ @@ -370,10 +370,10 @@ workflows: firebase: firebase_service_account: $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT ios: - app_id: 1:51495651779:ios:d4d28e75065983fb185576 + app_id: 1:51495651779:ios:d4d28e75065983fb185576 groups: - internal-testers - + # Notifications email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email recipients: @@ -391,10 +391,10 @@ workflows: ios-production-workflow: name: iOS Production <<: *instance_mac_mini_m2 - + integrations: app_store_connect: Social Income Recipient App - + environment: ios_signing: distribution_type: app_store @@ -404,21 +404,21 @@ workflows: - app-config-prod vars: APP_ID: 6444860109 # Apple ID of Prod App "Social Income" - << : *env_versions - + <<: *env_versions + cache: cache_paths: - $FLUTTER_ROOT/.pub-cache - $HOME/Library/Caches/CocoaPods - + scripts: - name: Print environment variables - script: | + script: | #!/bin/sh set -ex printenv - name: Load Prod Firebase configuration - script: | + script: | #!/usr/bin/env sh set -e # exit on first failed command @@ -428,26 +428,26 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + xcode-project use-profiles - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter packages pub get - name: Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command - + find . -name "Podfile" -execdir pod install \; - name: Flutter build ipa script: | #!/usr/bin/env sh set -e # exit on first failed command - + # Build the Flutter iOS app flutter build ipa --release \ --flavor prod \ @@ -465,11 +465,11 @@ workflows: # Publish to Apple's Testflight via AppStore Connect app_store_connect: # Use referenced App Store Connect API key from above to authenticate binary upload - auth: integration + auth: integration # Whether or not to submit the uploaded build to TestFlight beta review. # Note: This action is performed during post-processing. submit_to_testflight: true - + # Notifications email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email recipients: From 36293630b31c97546d56e6cb3b400506d6b991fd Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 20:49:17 +0100 Subject: [PATCH 04/45] Add working_directory: recipients_app --- codemagic.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codemagic.yaml b/codemagic.yaml index af1a5c592..0dc582dc1 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -23,6 +23,7 @@ definitions: echo "Required version: $REQUIRED_VERSION == Current version: $CURRENT_VERSION" echo "Flutter version is correct" fi + working_directory: recipients_app workflows: android-staging-firebase-app-distribution-workflow: @@ -72,6 +73,7 @@ workflows: set -e # exit on first failed command flutter packages pub get + working_directory: recipients_app - name: Build AAB with Flutter script: | #!/usr/bin/env sh @@ -170,6 +172,7 @@ workflows: set -e # exit on first failed command flutter packages pub get + working_directory: recipients_app - name: Build AAB with Flutter script: | #!/usr/bin/env sh @@ -251,6 +254,7 @@ workflows: set -e # exit on first failed command flutter packages pub get + working_directory: recipients_app - name: Install pods script: | #!/usr/bin/env sh @@ -341,6 +345,7 @@ workflows: set -e # exit on first failed command flutter packages pub get + working_directory: recipients_app - name: Install pods script: | #!/usr/bin/env sh @@ -437,6 +442,7 @@ workflows: set -e # exit on first failed command flutter packages pub get + working_directory: recipients_app - name: Install pods script: | #!/usr/bin/env sh From 5979b701be424cc98a1b766232778d6c7f53f17c Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 20:54:33 +0100 Subject: [PATCH 05/45] Comment out *verify_flutter_version for now --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 0dc582dc1..90c7678b6 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -66,7 +66,7 @@ workflows: # script: | # echo $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT > $GOOGLE_APPLICATION_CREDENTIALS # Define reusable section 'verify_flutter_version' - - *verify_flutter_version + #- *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh From b4875ce95a1486feb61f2a7e4029c5a3a49734ea Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 21:03:06 +0100 Subject: [PATCH 06/45] Fix artifacts paths --- codemagic.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 90c7678b6..b1fb13017 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -88,9 +88,9 @@ workflows: working_directory: recipients_app artifacts: - - build/**/outputs/**/*.apk - - build/**/outputs/**/*.aab - - build/**/outputs/**/mapping.txt + - recipients_app/build/**/outputs/**/*.apk + - recipients_app/build/**/outputs/**/*.aab + - recipients_app/build/**/outputs/**/mapping.txt - flutter_drive.log publishing: @@ -187,9 +187,9 @@ workflows: working_directory: recipients_app artifacts: - - build/**/outputs/**/*.apk - - build/**/outputs/**/*.aab - - build/**/outputs/**/mapping.txt + - recipients_app/build/**/outputs/**/*.apk + - recipients_app/build/**/outputs/**/*.aab + - recipients_app/build/**/outputs/**/mapping.txt - flutter_drive.log publishing: @@ -275,7 +275,7 @@ workflows: working_directory: recipients_app artifacts: - - build/ios/ipa/*.ipa + - recipients_app/build/ios/ipa/*.ipa - /tmp/xcodebuild_logs/*.log - flutter_drive.log @@ -366,7 +366,7 @@ workflows: working_directory: recipients_app artifacts: - - build/ios/ipa/*.ipa + - recipients_app/build/ios/ipa/*.ipa - /tmp/xcodebuild_logs/*.log - flutter_drive.log @@ -463,7 +463,7 @@ workflows: working_directory: recipients_app artifacts: - - build/ios/ipa/*.ipa + - recipients_app/build/ios/ipa/*.ipa - /tmp/xcodebuild_logs/*.log - flutter_drive.log From f060c2dbc38cdc8513c22f52ed32e9fdd4b9f5f1 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 21:07:27 +0100 Subject: [PATCH 07/45] Disable notifications temporary --- codemagic.yaml | 120 ++++++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index b1fb13017..0916a7ea8 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -107,18 +107,18 @@ workflows: artifact_type: "apk" # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails - slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - channel: $SLACK_CHANNEL_NAME - notify_on_build_start: false - notify: - success: true # To receive a notification when a build succeeds - failure: true # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails + # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + # channel: $SLACK_CHANNEL_NAME + # notify_on_build_start: false + # notify: + # success: true # To receive a notification when a build succeeds + # failure: true # To not receive a notification when a build fails android-production-workflow: name: Android Production @@ -199,18 +199,18 @@ workflows: # submit_as_draft: true # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails - slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - channel: $SLACK_CHANNEL_NAME - notify_on_build_start: false - notify: - success: true # To receive a notification when a build succeeds - failure: true # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails + # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + # channel: $SLACK_CHANNEL_NAME + # notify_on_build_start: false + # notify: + # success: true # To receive a notification when a build succeeds + # failure: true # To not receive a notification when a build fails ios-staging-testflight-workflow: name: iOS Staging (Test Flight) @@ -289,18 +289,18 @@ workflows: submit_to_testflight: true # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails - slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - channel: $SLACK_CHANNEL_NAME - notify_on_build_start: false - notify: - success: true # To receive a notification when a build succeeds - failure: true # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails + # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + # channel: $SLACK_CHANNEL_NAME + # notify_on_build_start: false + # notify: + # success: true # To receive a notification when a build succeeds + # failure: true # To not receive a notification when a build fails ios-staging-firebase-app-distribution-workflow: name: iOS Staging (Firebase App Distribution) @@ -380,18 +380,18 @@ workflows: - internal-testers # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails - slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - channel: $SLACK_CHANNEL_NAME - notify_on_build_start: false - notify: - success: true # To receive a notification when a build succeeds - failure: true # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails + # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + # channel: $SLACK_CHANNEL_NAME + # notify_on_build_start: false + # notify: + # success: true # To receive a notification when a build succeeds + # failure: true # To not receive a notification when a build fails ios-production-workflow: name: iOS Production @@ -477,15 +477,15 @@ workflows: submit_to_testflight: true # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails - slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - channel: $SLACK_CHANNEL_NAME - notify_on_build_start: false - notify: - success: true # To receive a notification when a build succeeds - failure: true # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails + # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + # channel: $SLACK_CHANNEL_NAME + # notify_on_build_start: false + # notify: + # success: true # To receive a notification when a build succeeds + # failure: true # To not receive a notification when a build fails From d5e25f1546b1d49f218f71968a0bf89442959a92 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 21:11:41 +0100 Subject: [PATCH 08/45] Disable not working script "*verify_flutter_version" in codemagic.yaml --- codemagic.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 0916a7ea8..e7c4156ee 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -9,9 +9,9 @@ definitions: cocoapods: default scripts: - - &verify_flutter_version + - &verify_flutter_version name: Verify Flutter version - script: | + script: | # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') @@ -66,7 +66,7 @@ workflows: # script: | # echo $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT > $GOOGLE_APPLICATION_CREDENTIALS # Define reusable section 'verify_flutter_version' - #- *verify_flutter_version + # - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -165,7 +165,7 @@ workflows: cd prod echo $ANDROID_FIREBASE_SECRET > google-services.json - - *verify_flutter_version + # - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -247,7 +247,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - - *verify_flutter_version + # - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -338,7 +338,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - - *verify_flutter_version + # - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -435,7 +435,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - - *verify_flutter_version + # - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh From 55ce5ae0c220945b7f271b7b45e4be35b0aa5c42 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 21:13:53 +0100 Subject: [PATCH 09/45] Fis workflow validation error --- codemagic.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index e7c4156ee..828828b57 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -199,12 +199,12 @@ workflows: # submit_as_draft: true # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack # channel: $SLACK_CHANNEL_NAME # notify_on_build_start: false From e904f4ec1b55d8733d7f2450a20f2ac0787f5f8e Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Mon, 6 Jan 2025 20:13:55 +0000 Subject: [PATCH 10/45] Prettified Code! --- codemagic.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 828828b57..a1607ea52 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -9,9 +9,9 @@ definitions: cocoapods: default scripts: - - &verify_flutter_version + - &verify_flutter_version name: Verify Flutter version - script: | + script: | # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') From 09dab2b3eefc51c70e4aafe13f378e7edb059d02 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Mon, 6 Jan 2025 21:27:23 +0100 Subject: [PATCH 11/45] Remove debug step "Print environment variables" --- codemagic.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index a1607ea52..8bade292c 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -46,11 +46,6 @@ workflows: - $FLUTTER_ROOT/.pub-cache scripts: - - name: Print environment variables - script: | - #!/bin/sh - set -ex - printenv - name: Set up key.properties script: | #!/usr/bin/env sh @@ -139,11 +134,6 @@ workflows: - $FLUTTER_ROOT/.pub-cache scripts: - - name: Print environment variables - script: | - #!/bin/sh - set -ex - printenv - name: Set up key.properties script: | #!/usr/bin/env sh @@ -236,11 +226,6 @@ workflows: - $HOME/Library/Caches/CocoaPods scripts: - - name: Print environment variables - script: | - #!/bin/sh - set -ex - printenv - name: Set up code signing settings on Xcode project script: | #!/usr/bin/env sh @@ -327,11 +312,6 @@ workflows: - $HOME/Library/Caches/CocoaPods scripts: - - name: Print environment variables - script: | - #!/bin/sh - set -ex - printenv - name: Set up code signing settings on Xcode project script: | #!/usr/bin/env sh @@ -417,11 +397,6 @@ workflows: - $HOME/Library/Caches/CocoaPods scripts: - - name: Print environment variables - script: | - #!/bin/sh - set -ex - printenv - name: Load Prod Firebase configuration script: | #!/usr/bin/env sh From aa23ddc23bc6ddfd2b525f39fdf2ef190ee4f022 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:08:59 +0100 Subject: [PATCH 12/45] Enable *verify_flutter_version again --- codemagic.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 8bade292c..47eebd790 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -61,7 +61,7 @@ workflows: # script: | # echo $FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT > $GOOGLE_APPLICATION_CREDENTIALS # Define reusable section 'verify_flutter_version' - # - *verify_flutter_version + - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -155,7 +155,7 @@ workflows: cd prod echo $ANDROID_FIREBASE_SECRET > google-services.json - # - *verify_flutter_version + - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -232,7 +232,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - # - *verify_flutter_version + - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -318,7 +318,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - # - *verify_flutter_version + - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh @@ -410,7 +410,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles - # - *verify_flutter_version + - *verify_flutter_version - name: Get Flutter packages script: | #!/usr/bin/env sh From c9f2c077571346c37007e943490bc37cc274e3c0 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:15:09 +0100 Subject: [PATCH 13/45] Remove working_directory --- codemagic.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 47eebd790..cc4468e0a 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -14,7 +14,7 @@ definitions: script: | # Verify Flutter version echo "Verify Flutter version..." - REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') + REQUIRED_VERSION=$(grep flutter ./recipients_app/.tool-versions | awk '{print $2}') CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" @@ -23,7 +23,6 @@ definitions: echo "Required version: $REQUIRED_VERSION == Current version: $CURRENT_VERSION" echo "Flutter version is correct" fi - working_directory: recipients_app workflows: android-staging-firebase-app-distribution-workflow: From a3257a0c69c9ba836202042ed825ba200d220f14 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:26:42 +0100 Subject: [PATCH 14/45] debug --- codemagic.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index cc4468e0a..c1ea7606b 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -15,7 +15,9 @@ definitions: # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter ./recipients_app/.tool-versions | awk '{print $2}') - CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') + echo "$REQUIRED_VERSION" + flutter --version + #CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" exit 1 From 3df87102aee47eb343d4d54776d5595c4e069009 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:39:24 +0100 Subject: [PATCH 15/45] fix --- codemagic.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index c1ea7606b..7d65cef4d 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -14,10 +14,8 @@ definitions: script: | # Verify Flutter version echo "Verify Flutter version..." - REQUIRED_VERSION=$(grep flutter ./recipients_app/.tool-versions | awk '{print $2}') - echo "$REQUIRED_VERSION" - flutter --version - #CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') + REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') + CURRENT_VERSION=$(flutter --version | grep -m 1 "^Flutter" | awk '{print $2}') if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" exit 1 @@ -25,6 +23,7 @@ definitions: echo "Required version: $REQUIRED_VERSION == Current version: $CURRENT_VERSION" echo "Flutter version is correct" fi + working_directory: recipients_app workflows: android-staging-firebase-app-distribution-workflow: From 76ec8991613339038f2b18542285b86300730ab9 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:39:43 +0100 Subject: [PATCH 16/45] improve clean_build script --- recipients_app/clean_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipients_app/clean_build.sh b/recipients_app/clean_build.sh index 2134d69f9..01bf85e71 100755 --- a/recipients_app/clean_build.sh +++ b/recipients_app/clean_build.sh @@ -13,7 +13,7 @@ fi # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') -CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}') +CURRENT_VERSION=$(flutter --version | grep -m 1 "^Flutter" | awk '{print $2}') if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" exit 1 From ec33b931b6361fdf90c4dc0d6cfb6dd7e8581a64 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:41:53 +0100 Subject: [PATCH 17/45] Define Cocoapods and java --- codemagic.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 7d65cef4d..00fd945bb 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -6,7 +6,8 @@ definitions: env_versions: &env_versions flutter: 3.22.3 xcode: 15.4 - cocoapods: default + cocoapods: 1.16.2 + java: 17 scripts: - &verify_flutter_version From 383912025d3b5483911e303674554d05071a00fd Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:46:17 +0100 Subject: [PATCH 18/45] Add sourceCompatibility and targetCompatibility in Android app build gradle --- recipients_app/android/app/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipients_app/android/app/build.gradle b/recipients_app/android/app/build.gradle index 578f15e27..03a9efddd 100644 --- a/recipients_app/android/app/build.gradle +++ b/recipients_app/android/app/build.gradle @@ -36,6 +36,11 @@ android { main.java.srcDirs += 'src/main/kotlin' } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + defaultConfig { applicationId "org.socialincome.app" minSdkVersion 21 From 590c60f3f414ed7931b0f6bba299cecc8c774057 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:49:02 +0100 Subject: [PATCH 19/45] debug --- codemagic.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 00fd945bb..fdfadca7a 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -16,7 +16,13 @@ definitions: # Verify Flutter version echo "Verify Flutter version..." REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') - CURRENT_VERSION=$(flutter --version | grep -m 1 "^Flutter" | awk '{print $2}') + echo "REQUIRED_VERSION: $REQUIRED_VERSION" + + FLUTTER_LINE=$(flutter --version | grep -m 1 "^Flutter") + echo "FLUTTER_LINE: $FLUTTER_LINE" + CURRENT_VERSION=$($FLUTTER_LINE | awk '{print $2}') + echo "CURRENT_VERSION: $CURRENT_VERSION" + if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" exit 1 From 6d1d50b580c9891cd53868491a1cae1fffc8daba Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Fri, 10 Jan 2025 16:51:14 +0000 Subject: [PATCH 20/45] Prettified Code! --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index fdfadca7a..1f9931862 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -22,7 +22,7 @@ definitions: echo "FLUTTER_LINE: $FLUTTER_LINE" CURRENT_VERSION=$($FLUTTER_LINE | awk '{print $2}') echo "CURRENT_VERSION: $CURRENT_VERSION" - + if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)" exit 1 From ff977c0de8d4438490141e743270daf45e4575c7 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 17:58:56 +0100 Subject: [PATCH 21/45] Revert last change --- codemagic.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 1f9931862..356675b56 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -15,12 +15,10 @@ definitions: script: | # Verify Flutter version echo "Verify Flutter version..." + REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}') echo "REQUIRED_VERSION: $REQUIRED_VERSION" - - FLUTTER_LINE=$(flutter --version | grep -m 1 "^Flutter") - echo "FLUTTER_LINE: $FLUTTER_LINE" - CURRENT_VERSION=$($FLUTTER_LINE | awk '{print $2}') + CURRENT_VERSION=$(flutter --version | grep -m 1 "^Flutter" | awk '{print $2}') echo "CURRENT_VERSION: $CURRENT_VERSION" if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then From d4f832e8e24e0c477581fcd07640c83bfdef2d93 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 18:00:41 +0100 Subject: [PATCH 22/45] disable email notification --- codemagic.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 356675b56..927f6f834 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -194,12 +194,12 @@ workflows: # submit_as_draft: true # Notifications - email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - recipients: - - sandino@socialincome.org - notify: - success: true # To receive a notification when a build succeeds - failure: false # To not receive a notification when a build fails + # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + # recipients: + # - sandino@socialincome.org + # notify: + # success: true # To receive a notification when a build succeeds + # failure: false # To not receive a notification when a build fails # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack # channel: $SLACK_CHANNEL_NAME # notify_on_build_start: false From f03fe4ac95dc2a645879700deb7400fbabe97d7e Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 18:01:38 +0100 Subject: [PATCH 23/45] Revert last change --- codemagic.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 927f6f834..fb788ea69 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -194,12 +194,13 @@ workflows: # submit_as_draft: true # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + #- sandino@socialincome.org + - karin@karinberg.de + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack # channel: $SLACK_CHANNEL_NAME # notify_on_build_start: false From d7429720d9af683ab7d725619494542bce73a1d3 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 18:10:40 +0100 Subject: [PATCH 24/45] Revert "Add sourceCompatibility and targetCompatibility in Android app build gradle" This reverts commit 19f78f7fb1774d36c39f41f2c3bc0b471abacfbb. --- recipients_app/android/app/build.gradle | 5 ----- 1 file changed, 5 deletions(-) diff --git a/recipients_app/android/app/build.gradle b/recipients_app/android/app/build.gradle index 03a9efddd..578f15e27 100644 --- a/recipients_app/android/app/build.gradle +++ b/recipients_app/android/app/build.gradle @@ -36,11 +36,6 @@ android { main.java.srcDirs += 'src/main/kotlin' } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - defaultConfig { applicationId "org.socialincome.app" minSdkVersion 21 From 0d81f4c06b96ef46ef0109729e6118aef999a5a8 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 18:31:39 +0100 Subject: [PATCH 25/45] Use Wildcard identifier --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index fb788ea69..34ed2e84a 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -303,7 +303,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: org.socialincome.app.stage + bundle_identifier: * groups: - slack - app-config-stage From 532fdb4cf96ef7c7736c701c9ff790a971fd9771 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 18:32:35 +0100 Subject: [PATCH 26/45] fix --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 34ed2e84a..19675ca28 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -303,7 +303,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: * + bundle_identifier: '*' # Wildcard bundle identifier groups: - slack - app-config-stage From 6fdde0ca6bb8e9d0bd6647f7ccf3a98b45501d9f Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Fri, 10 Jan 2025 17:34:39 +0000 Subject: [PATCH 27/45] Prettified Code! --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 19675ca28..3f61aa3e2 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -303,7 +303,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: '*' # Wildcard bundle identifier + bundle_identifier: "*" # Wildcard bundle identifier groups: - slack - app-config-stage From 5cef1bed2fe75e2daa6be4131a1f071fe0889643 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 20:21:59 +0100 Subject: [PATCH 28/45] test --- codemagic.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 3f61aa3e2..2a3efa2ac 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -303,7 +303,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: "*" # Wildcard bundle identifier + bundle_identifier: org.socialincome.app.stage groups: - slack - app-config-stage @@ -318,6 +318,15 @@ workflows: - $HOME/Library/Caches/CocoaPods scripts: + - name: Set up keychain to be used for code signing using Codemagic CLI 'keychain' command + script: keychain initialize + - name: Fetch signing files + script: | + app-store-connect fetch-signing-files "org.socialincome.app.stage" \ + --type IOS_APP_ADHOC \ + --create + - name: Set up signing certificate + script: keychain add-certificates - name: Set up code signing settings on Xcode project script: | #!/usr/bin/env sh From 7f5b1b1c4b4df140ae199bcca1c2a62edec681a8 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Fri, 10 Jan 2025 20:23:40 +0100 Subject: [PATCH 29/45] disable ios_signing --- codemagic.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 2a3efa2ac..7aeb3d784 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -301,9 +301,9 @@ workflows: app_store_connect: Social Income Recipient App environment: - ios_signing: - distribution_type: ad_hoc - bundle_identifier: org.socialincome.app.stage + # ios_signing: + # distribution_type: ad_hoc + # bundle_identifier: org.socialincome.app.stage groups: - slack - app-config-stage From 39cb8f51d65bc621bee8101d14ad05480d55509c Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Fri, 10 Jan 2025 19:25:45 +0000 Subject: [PATCH 30/45] Prettified Code! --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 7aeb3d784..1a4dace0d 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -321,7 +321,7 @@ workflows: - name: Set up keychain to be used for code signing using Codemagic CLI 'keychain' command script: keychain initialize - name: Fetch signing files - script: | + script: | app-store-connect fetch-signing-files "org.socialincome.app.stage" \ --type IOS_APP_ADHOC \ --create From 1fba4a9c4a12dee6fe215d559afebbd76608334e Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 17:14:28 +0100 Subject: [PATCH 31/45] try --- codemagic.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 1a4dace0d..5cba7ef2f 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -301,9 +301,9 @@ workflows: app_store_connect: Social Income Recipient App environment: - # ios_signing: - # distribution_type: ad_hoc - # bundle_identifier: org.socialincome.app.stage + ios_signing: + distribution_type: ad_hoc + bundle_identifier: org.socialincome.app.stage groups: - slack - app-config-stage @@ -318,15 +318,15 @@ workflows: - $HOME/Library/Caches/CocoaPods scripts: - - name: Set up keychain to be used for code signing using Codemagic CLI 'keychain' command - script: keychain initialize - - name: Fetch signing files - script: | - app-store-connect fetch-signing-files "org.socialincome.app.stage" \ - --type IOS_APP_ADHOC \ - --create - - name: Set up signing certificate - script: keychain add-certificates + # - name: Set up keychain to be used for code signing using Codemagic CLI 'keychain' command + # script: keychain initialize + # - name: Fetch signing files + # script: | + # app-store-connect fetch-signing-files "org.socialincome.app.stage" \ + # --type IOS_APP_ADHOC \ + # --create + # - name: Set up signing certificate + # script: keychain add-certificates - name: Set up code signing settings on Xcode project script: | #!/usr/bin/env sh From 535a343d5cb494599ceca5525c107793d53961e1 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 17:52:46 +0100 Subject: [PATCH 32/45] Use wildcard identifier --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 5cba7ef2f..53df28f98 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -303,7 +303,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: org.socialincome.app.stage + bundle_identifier: "*" groups: - slack - app-config-stage From 10f0853167103f2d975aef48f7cc20322263f1e3 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 18:39:09 +0100 Subject: [PATCH 33/45] Fix pod install --- codemagic.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 53df28f98..20df17090 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -346,7 +346,8 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - find . -name "Podfile" -execdir pod install \; + pod install + working_directory: recipients_app/ios - name: Flutter build ipa script: | #!/usr/bin/env sh From 917dbee567aeefa0b93eded1f94bd168470b68b6 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 18:59:45 +0100 Subject: [PATCH 34/45] update podfile.lock --- recipients_app/ios/Podfile.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/recipients_app/ios/Podfile.lock b/recipients_app/ios/Podfile.lock index ba6dd0339..76837dde9 100644 --- a/recipients_app/ios/Podfile.lock +++ b/recipients_app/ios/Podfile.lock @@ -222,12 +222,12 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: AppCheckCore: 9feb4300caa596a36416cde10674dc5bec1e022e - cloud_firestore: 003d53b6b8b392600b7769acf9421cc4f23e5911 + cloud_firestore: 28753092b326c43b17251b50aa6c5b3247c939e5 Firebase: 0312a2352584f782ea56f66d91606891d4607f06 - firebase_app_check: 717089a2df93747620263dd6c8e444bde5699b7e - firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235 - firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197 - firebase_messaging: 06391e8f35dc65a00c56580266285263d2861f10 + firebase_app_check: d2513b120608284733805c98e80b5b11c1bf705e + firebase_auth: f17bd6bfc0bc3d83c6df9dc3829e5b6fee10b147 + firebase_core: 3b49a055ff54114cae400581c13671fe53936c36 + firebase_messaging: 30fa3ec8cd0dc8a860b7817548911b97345a0875 FirebaseAppCheck: 148fa858b8070710c8f83d3f545b5f1e85d104a4 FirebaseAppCheckInterop: 6a1757cfd4067d8e00fccd14fcc1b8fd78cfac07 FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb @@ -245,19 +245,19 @@ SPEC CHECKSUMS: FirebaseMessaging: 88950ba9485052891ebe26f6c43a52bb62248952 FirebaseSharedSwift: 0274086954b1b2d5fd7e829eccc587044d72a4ba Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 + flutter_native_splash: 35ddbc7228eafcb3969dcc5f1fbbe27c1145a4f0 GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 leveldb-library: cc8b8f8e013647a295ad3f8cd2ddf49a6f19be19 nanopb: 438bc412db1928dac798aa6fd75726007be04262 - package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 + package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 Sentry: e9215d7b17f7902692b4f8700e061e4f853e3521 - sentry_flutter: 927eed60d66951d1b0f1db37fe94ff5cb7c80231 - url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 - webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36 + sentry_flutter: ba644c90ccccb202066a5218a593d1c35584cd37 + url_launcher_ios: c14c42eb16c26cfb6c43c2e40ce35a4085431791 + webview_flutter_wkwebview: 3a409e0c27995945d2dabd90079927fba5c34492 PODFILE CHECKSUM: f727177ee8bd2fa0ad40e98c3b4299dfade495ac From e75ae74f54e0ef35aaf4bdc9c5349fa5dd46460c Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 19:05:12 +0100 Subject: [PATCH 35/45] correct flutter pub get --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 20df17090..cc540ddee 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -72,7 +72,7 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - flutter packages pub get + flutter pub get working_directory: recipients_app - name: Build AAB with Flutter script: | From e50fca682f9343e7e406b157e9e4f812e2815781 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 19:08:07 +0100 Subject: [PATCH 36/45] correct flutter pub get --- codemagic.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index cc540ddee..5f3b2c1e1 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -166,7 +166,7 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - flutter packages pub get + flutter pub get working_directory: recipients_app - name: Build AAB with Flutter script: | @@ -244,7 +244,7 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - flutter packages pub get + flutter pub get working_directory: recipients_app - name: Install pods script: | @@ -339,7 +339,7 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - flutter packages pub get + flutter pub get working_directory: recipients_app - name: Install pods script: | @@ -432,7 +432,7 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - flutter packages pub get + flutter pub get working_directory: recipients_app - name: Install pods script: | From e39606599b5c9b96377fb33fe3330c06660b9637 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 19:26:29 +0100 Subject: [PATCH 37/45] test --- codemagic.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 5f3b2c1e1..1fa266ce3 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -345,9 +345,11 @@ workflows: script: | #!/usr/bin/env sh set -e # exit on first failed command - + flutter pub get + cd ios pod install - working_directory: recipients_app/ios + cd .. + working_directory: recipients_app - name: Flutter build ipa script: | #!/usr/bin/env sh From 3a4794aa34d9d5f84362b0df416fdd3d1e9fd27b Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 19:39:06 +0100 Subject: [PATCH 38/45] Add --export-method ad-hoc --- codemagic.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 1fa266ce3..4c5869a94 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -360,7 +360,8 @@ workflows: --flavor stage \ -t lib/main.dart \ --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ - --dart-define=SENTRY_URL=$SENTRY_URL + --dart-define=SENTRY_URL=$SENTRY_URL \ + --export-method ad-hoc working_directory: recipients_app artifacts: From 042913d8c4e6927cf59ffaaa8b50485b3edc10dd Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 19:41:52 +0100 Subject: [PATCH 39/45] Add --export-method ad-hoc --- codemagic.yaml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 4c5869a94..2d4c23414 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -239,19 +239,14 @@ workflows: xcode-project use-profiles - *verify_flutter_version - - name: Get Flutter packages + - name: Get Flutter packages & Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command flutter pub get - working_directory: recipients_app - - name: Install pods - script: | - #!/usr/bin/env sh - set -e # exit on first failed command - find . -name "Podfile" -execdir pod install \; + working_directory: recipients_app - name: Flutter build ipa script: | #!/usr/bin/env sh @@ -262,7 +257,8 @@ workflows: --flavor stage \ -t lib/main.dart \ --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ - --dart-define=SENTRY_URL=$SENTRY_URL + --dart-define=SENTRY_URL=$SENTRY_URL \ + --export-method ad-hoc working_directory: recipients_app artifacts: @@ -334,21 +330,13 @@ workflows: xcode-project use-profiles - *verify_flutter_version - - name: Get Flutter packages + - name: Get Flutter packages & Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command flutter pub get - working_directory: recipients_app - - name: Install pods - script: | - #!/usr/bin/env sh - set -e # exit on first failed command - flutter pub get - cd ios - pod install - cd .. + find . -name "Podfile" -execdir pod install \; working_directory: recipients_app - name: Flutter build ipa script: | @@ -430,19 +418,14 @@ workflows: xcode-project use-profiles - *verify_flutter_version - - name: Get Flutter packages + - name: Get Flutter packages & Install pods script: | #!/usr/bin/env sh set -e # exit on first failed command flutter pub get - working_directory: recipients_app - - name: Install pods - script: | - #!/usr/bin/env sh - set -e # exit on first failed command - find . -name "Podfile" -execdir pod install \; + working_directory: recipients_app - name: Flutter build ipa script: | #!/usr/bin/env sh From 99e36f7578034ef178727f88e990eea18100fa2f Mon Sep 17 00:00:00 2001 From: KarinBerg Date: Sat, 11 Jan 2025 18:44:35 +0000 Subject: [PATCH 40/45] Prettified Code! --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 2d4c23414..3ef8c023e 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -246,7 +246,7 @@ workflows: flutter pub get find . -name "Podfile" -execdir pod install \; - working_directory: recipients_app + working_directory: recipients_app - name: Flutter build ipa script: | #!/usr/bin/env sh From 1cc5127f94d67fa464c3be3ba19e33d3916a8228 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 20:00:03 +0100 Subject: [PATCH 41/45] Use --export-options-plist --- codemagic.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 3ef8c023e..dea987b31 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -328,7 +328,12 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - xcode-project use-profiles + xcode-project use-profiles \ + --archive-method=ad-hoc \ + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist + + # Print the export options plist + more $CM_BUILD_DIR/recipients_app/ios/export_options.plist - *verify_flutter_version - name: Get Flutter packages & Install pods script: | @@ -349,7 +354,7 @@ workflows: -t lib/main.dart \ --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ --dart-define=SENTRY_URL=$SENTRY_URL \ - --export-method ad-hoc + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist working_directory: recipients_app artifacts: From 79785894635a6d688a66906d09b19b483b7cbc46 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 20:12:35 +0100 Subject: [PATCH 42/45] Use --export-options-plist --- codemagic.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index dea987b31..84eeda2ea 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -237,7 +237,12 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - xcode-project use-profiles + xcode-project use-profiles \ + --archive-method=ad-hoc \ + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist + + # Print the export options plist + more $CM_BUILD_DIR/recipients_app/ios/export_options.plist - *verify_flutter_version - name: Get Flutter packages & Install pods script: | @@ -258,7 +263,7 @@ workflows: -t lib/main.dart \ --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ --dart-define=SENTRY_URL=$SENTRY_URL \ - --export-method ad-hoc + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist working_directory: recipients_app artifacts: From 36172103ec6dd445042307e1c99db5e13d1e280e Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 20:18:13 +0100 Subject: [PATCH 43/45] Use --export-options-plist --- codemagic.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 84eeda2ea..47d7dfed3 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -238,7 +238,7 @@ workflows: set -e # exit on first failed command xcode-project use-profiles \ - --archive-method=ad-hoc \ + --archive-method=app-store \ --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist # Print the export options plist @@ -426,7 +426,12 @@ workflows: #!/usr/bin/env sh set -e # exit on first failed command - xcode-project use-profiles + xcode-project use-profiles \ + --archive-method=app-store \ + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist + + # Print the export options plist + more $CM_BUILD_DIR/recipients_app/ios/export_options.plist - *verify_flutter_version - name: Get Flutter packages & Install pods script: | @@ -446,7 +451,8 @@ workflows: --flavor prod \ -t lib/main.dart \ --dart-define=SURVEY_BASE_URL=$SURVEY_BASE_URL \ - --dart-define=SENTRY_URL=$SENTRY_URL + --dart-define=SENTRY_URL=$SENTRY_URL \ + --export-options-plist=$CM_BUILD_DIR/recipients_app/ios/export_options.plist working_directory: recipients_app artifacts: From ce6a28a81ee79b8acb56fdca6c92676559738633 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 20:28:57 +0100 Subject: [PATCH 44/45] enable notifications again --- codemagic.yaml | 108 ++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 47d7dfed3..d0a39bff0 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -107,18 +107,18 @@ workflows: artifact_type: "apk" # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails - # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - # channel: $SLACK_CHANNEL_NAME - # notify_on_build_start: false - # notify: - # success: true # To receive a notification when a build succeeds - # failure: true # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails android-production-workflow: name: Android Production @@ -201,12 +201,12 @@ workflows: notify: success: true # To receive a notification when a build succeeds failure: false # To not receive a notification when a build fails - # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - # channel: $SLACK_CHANNEL_NAME - # notify_on_build_start: false - # notify: - # success: true # To receive a notification when a build succeeds - # failure: true # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails ios-staging-testflight-workflow: name: iOS Staging (Test Flight) @@ -281,18 +281,18 @@ workflows: submit_to_testflight: true # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails - # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - # channel: $SLACK_CHANNEL_NAME - # notify_on_build_start: false - # notify: - # success: true # To receive a notification when a build succeeds - # failure: true # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails ios-staging-firebase-app-distribution-workflow: name: iOS Staging (Firebase App Distribution) @@ -377,18 +377,18 @@ workflows: - internal-testers # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails - # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - # channel: $SLACK_CHANNEL_NAME - # notify_on_build_start: false - # notify: - # success: true # To receive a notification when a build succeeds - # failure: true # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails ios-production-workflow: name: iOS Production @@ -470,15 +470,15 @@ workflows: submit_to_testflight: true # Notifications - # email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email - # recipients: - # - sandino@socialincome.org - # notify: - # success: true # To receive a notification when a build succeeds - # failure: false # To not receive a notification when a build fails - # slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack - # channel: $SLACK_CHANNEL_NAME - # notify_on_build_start: false - # notify: - # success: true # To receive a notification when a build succeeds - # failure: true # To not receive a notification when a build fails + email: # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email + recipients: + - sandino@socialincome.org + notify: + success: true # To receive a notification when a build succeeds + failure: false # To not receive a notification when a build fails + slack: # See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack + channel: $SLACK_CHANNEL_NAME + notify_on_build_start: false + notify: + success: true # To receive a notification when a build succeeds + failure: true # To not receive a notification when a build fails From c2030dc04e77abd50dd44e12dedd16c7204daa38 Mon Sep 17 00:00:00 2001 From: Karin Berg Date: Sat, 11 Jan 2025 20:29:46 +0100 Subject: [PATCH 45/45] Set bundle_identifier --- codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index d0a39bff0..f6b0e2bae 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -304,7 +304,7 @@ workflows: environment: ios_signing: distribution_type: ad_hoc - bundle_identifier: "*" + bundle_identifier: org.socialincome.app.stage groups: - slack - app-config-stage