From 5cd60fedbbb59c8006270808a24f458f4e526072 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 22 Jan 2025 00:32:42 +0100 Subject: [PATCH 01/10] Use different way to read the files from op --- .github/workflows/testBuildHybrid.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index 549349887e3d..fb0dce14a478 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -308,9 +308,9 @@ jobs: env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} run: | - op document get --output ./OldApp_AdHoc.mobileprovision OldApp_AdHoc - op document get --output ./OldApp_AdHoc_Share_Extension.mobileprovision OldApp_AdHoc_Share_Extension - op document get --output ./OldApp_AdHoc_Notification_Service.mobileprovision OldApp_AdHoc_Notification_Service + op read op://Mobile-Deploy-CI/OldApp_AdHoc/OldApp_AdHoc.mobileprovision --force --out-file ./OldApp_AdHoc.mobileprovision + op read op://Mobile-Deploy-CI/OldApp_AdHoc_Share_Extension/OldApp_AdHoc_Share_Extension.mobileprovision --force --out-file ./OldApp_AdHoc_Share_Extension.mobileprovision + op read op://Mobile-Deploy-CI/OldApp_AdHoc_Notification_Service/OldApp_AdHoc_Notification_Service.mobileprovision --force --out-file ./OldApp_AdHoc_Notification_Service.mobileprovision - name: Decrypt certificate run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output Certificates.p12 Certificates.p12.gpg From f90c137c9099f426695c13c5837bf0881e495f07 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 22 Jan 2025 15:19:25 +0100 Subject: [PATCH 02/10] Use process to get the right env --- .github/workflows/testBuildHybrid.yml | 2 +- Mobile-Expensify | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index fb0dce14a478..eabd79476cfb 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -77,7 +77,7 @@ jobs: const pullRequest = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, - pull_number: env.PULL_REQUEST_NUMBER, + pull_number: process.env.PULL_REQUEST_NUMBER, }); const body = pullRequest.data.body; diff --git a/Mobile-Expensify b/Mobile-Expensify index 37873194260d..618fe635eca8 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 37873194260df675ca55c3f14cc41f65601e9746 +Subproject commit 618fe635eca8ca244bd556cbc010705b2df5e730 From 71257041a22418c7fd054f7459b9fdbc91295d56 Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Wed, 22 Jan 2025 17:06:21 +0100 Subject: [PATCH 03/10] Do not skip build jobs if no OD PR is mentioned --- .github/workflows/testBuildHybrid.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index db40942316b1..cd32376a0dba 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -89,7 +89,6 @@ jobs: getOldDotBranchRef: runs-on: ubuntu-latest needs: getOldDotPR - if: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR != '' }} outputs: OLD_DOT_REF: ${{ steps.getHeadRef.outputs.REF }} steps: @@ -100,7 +99,11 @@ jobs: id: getHeadRef run: | set -e - echo "REF=$(gh pr view ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }} -R 'Expensify/Mobile-Expensify' --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT" + if [[ ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }} == '' ]]; then + echo "REF=" >> "$GITHUB_OUTPUT" + else + echo "REF=$(gh pr view ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }} -R Expensify/Mobile-Expensify --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT" + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 73ba6923bfd8f99c1885829d54e3eeeb1f9dd0b0 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 22 Jan 2025 20:54:04 +0100 Subject: [PATCH 04/10] Update the adhoc profile names --- fastlane/Fastfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 806ffe574031..9991190472fb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -443,9 +443,9 @@ platform :ios do export_options: { manageAppVersionAndBuildNumber: false, provisioningProfiles: { - "com.expensify.expensifylite.adhoc" => "(OldApp) AppStore", - "com.expensify.expensifylite.adhoc.SmartScanExtension" => "(OldApp) AppStore: Share Extension", - "com.expensify.expensifylite.adhoc.NotificationServiceExtension" => "(OldApp) AppStore: Notification Service", + "com.expensify.expensifylite.adhoc" => "(OldApp) AdHoc", + "com.expensify.expensifylite.adhoc.SmartScanExtension" => "(OldApp) AdHoc: Share Extension", + "com.expensify.expensifylite.adhoc.NotificationServiceExtension" => "(OldApp) AdHoc: Notification Service", } } ) From 55fb363ec055c4b238746f1054e57e9162fb58dd Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Thu, 23 Jan 2025 14:30:09 +0100 Subject: [PATCH 05/10] Use different token --- .github/workflows/testBuildHybrid.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index cd32376a0dba..8d896329fe74 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -105,7 +105,7 @@ jobs: echo "REF=$(gh pr view ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }} -R Expensify/Mobile-Expensify --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT" fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} postGitHubCommentBuildStarted: From 183834fdf64cec4b8b7da9bc74ceafa8b5dbb26a Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Thu, 23 Jan 2025 15:41:58 +0100 Subject: [PATCH 06/10] Fetch PR ref before checkout --- .github/workflows/testBuildHybrid.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index 8d896329fe74..7ed0ed2c54fa 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -151,7 +151,7 @@ jobs: if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }} run: | cd Mobile-Expensify - git fetch + git fetch origin ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} - name: Configure MapBox SDK From 9f338e98c8497224b99e01725a2424587c0a61b2 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Thu, 23 Jan 2025 15:45:01 +0100 Subject: [PATCH 07/10] update the fetch --- .github/workflows/testBuildHybrid.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index c20d9b4b0705..d958e0958083 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -151,7 +151,7 @@ jobs: if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }} run: | cd Mobile-Expensify - git fetch + git fetch origin ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} - name: Configure MapBox SDK @@ -262,7 +262,7 @@ jobs: if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }} run: | cd Mobile-Expensify - git fetch + git fetch origin ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} - name: Configure MapBox SDK From a8b29a35669d6eb8126d0fce79fa89a8de04a0ef Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Fri, 24 Jan 2025 08:46:06 +0100 Subject: [PATCH 08/10] Use adhoc scheme --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 806ffe574031..a83ef268b7aa 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -437,7 +437,7 @@ platform :ios do build_app( workspace: "Mobile-Expensify/iOS/Expensify.xcworkspace", - scheme: "Expensify", + scheme: "Expensify AdHoc", output_name: "Expensify.ipa", export_method: "app-store", export_options: { From d1c506713bad5bc94cb3a577a7784458d87b54b3 Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Fri, 24 Jan 2025 08:51:20 +0100 Subject: [PATCH 09/10] Read op files --- .github/workflows/testBuildHybrid.yml | 8 ++++---- fastlane/Fastfile | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml index 7ed0ed2c54fa..bfb2cd34c558 100644 --- a/.github/workflows/testBuildHybrid.yml +++ b/.github/workflows/testBuildHybrid.yml @@ -262,7 +262,7 @@ jobs: if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }} run: | cd Mobile-Expensify - git fetch + git fetch origin ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }} - name: Configure MapBox SDK @@ -314,9 +314,9 @@ jobs: env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} run: | - op document get --output ./OldApp_AdHoc.mobileprovision OldApp_AdHoc - op document get --output ./OldApp_AdHoc_Share_Extension.mobileprovision OldApp_AdHoc_Share_Extension - op document get --output ./OldApp_AdHoc_Notification_Service.mobileprovision OldApp_AdHoc_Notification_Service + op read op://Mobile-Deploy-CI/OldApp_AdHoc/OldApp_AdHoc.mobileprovision --force --out-file ./OldApp_AdHoc.mobileprovision + op read op://Mobile-Deploy-CI/OldApp_AdHoc_Share_Extension/OldApp_AdHoc_Share_Extension.mobileprovision --force --out-file ./OldApp_AdHoc_Share_Extension.mobileprovision + op read op://Mobile-Deploy-CI/OldApp_AdHoc_Notification_Service/OldApp_AdHoc_Notification_Service.mobileprovision --force --out-file ./OldApp_AdHoc_Notification_Service.mobileprovision - name: Decrypt certificate run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output Certificates.p12 Certificates.p12.gpg diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a83ef268b7aa..8747a535007e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -443,9 +443,9 @@ platform :ios do export_options: { manageAppVersionAndBuildNumber: false, provisioningProfiles: { - "com.expensify.expensifylite.adhoc" => "(OldApp) AppStore", - "com.expensify.expensifylite.adhoc.SmartScanExtension" => "(OldApp) AppStore: Share Extension", - "com.expensify.expensifylite.adhoc.NotificationServiceExtension" => "(OldApp) AppStore: Notification Service", + "com.expensify.expensifylite.adhoc" => "(OldApp) AdHoc", + "com.expensify.expensifylite.adhoc.SmartScanExtension" => "(OldApp) AdHoc: Share Extension", + "com.expensify.expensifylite.adhoc.NotificationServiceExtension" => "(OldApp) AdHoc: Notification Service", } } ) From 72a73ab4131c735ab8bd3dc0c050c8b8a9468d74 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 24 Jan 2025 12:09:51 -0800 Subject: [PATCH 10/10] update Fastlane, correctly set adhoc type --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 8747a535007e..7efd6d5ebe1b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -439,7 +439,7 @@ platform :ios do workspace: "Mobile-Expensify/iOS/Expensify.xcworkspace", scheme: "Expensify AdHoc", output_name: "Expensify.ipa", - export_method: "app-store", + export_method: "ad-hoc", export_options: { manageAppVersionAndBuildNumber: false, provisioningProfiles: {