From 0d42b66bb7d8f471d71518af3bb06a7a7621bca0 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 15 Apr 2025 13:03:17 -0700 Subject: [PATCH 1/2] Fix tag fetching in cherryPick.yml --- .github/workflows/cherryPick.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index d4c3d9b41d0e..025bb7631470 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -34,7 +34,6 @@ jobs: git submodule foreach '\ git config --add remote.origin.fetch "+refs/heads/staging:refs/remotes/origin/staging" && \ git config --add remote.origin.fetch "+refs/heads/production:refs/remotes/origin/production" && \ - git config --add remote.origin.fetch "+refs/tags/*:refs/tags/*"' - name: Set up git for OSBotify id: setupGitForOSBotify @@ -53,9 +52,20 @@ jobs: - name: Fetch history of relevant refs run: | - git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} + # Temporary hack during transition when -staging suffix is being added to tags + if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then + git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} + else + git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging + fi + cd Mobile-Expensify - git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} + # Temporary hack during transition when -staging suffix is being added to tags + if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then + git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} + else + git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging + fi - name: Get E/App version bump commit id: getVersionBumpCommit From 40dba4a442d4ebf1d055443f0cac58d0fc0a69da Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 15 Apr 2025 13:07:11 -0700 Subject: [PATCH 2/2] Fix unended single quote --- .github/workflows/cherryPick.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 025bb7631470..4ecdbd277f49 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -33,7 +33,7 @@ jobs: run: | git submodule foreach '\ git config --add remote.origin.fetch "+refs/heads/staging:refs/remotes/origin/staging" && \ - git config --add remote.origin.fetch "+refs/heads/production:refs/remotes/origin/production" && \ + git config --add remote.origin.fetch "+refs/heads/production:refs/remotes/origin/production"' - name: Set up git for OSBotify id: setupGitForOSBotify