Skip to content

Commit 014f9ce

Browse files
committed
Tell git to stop searching after first match is found
1 parent 42f3bad commit 014f9ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/cherryPick.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: getVersionBumpCommit
5050
run: |
5151
git switch main
52-
VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')"
52+
VERSION_BUMP_COMMIT="$(git log -1 --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')"
5353
if [ -z "$VERSION_BUMP_COMMIT" ]; then
5454
echo "::error::❌ Could not find version bump commit for ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
5555
git log --oneline
@@ -63,7 +63,7 @@ jobs:
6363
working-directory: Mobile-Expensify
6464
run: |
6565
git switch main
66-
VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')"
66+
VERSION_BUMP_COMMIT="$(git log -1 --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')"
6767
if [ -z "$VERSION_BUMP_COMMIT" ]; then
6868
echo "::error::❌ Could not find version bump commit for ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
6969
git log --oneline

0 commit comments

Comments
 (0)