From 8b34d533589ff52b48f81a4c3f642786ec3eb503 Mon Sep 17 00:00:00 2001 From: Constrat <56174894+Constrat@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:31:33 +0200 Subject: [PATCH] fix: revert to simple if --- .github/workflows/blame-ignore.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blame-ignore.yml b/.github/workflows/blame-ignore.yml index 2898e5ff9c..8e6fd3bd6d 100644 --- a/.github/workflows/blame-ignore.yml +++ b/.github/workflows/blame-ignore.yml @@ -16,10 +16,14 @@ jobs: - name: Get last checked commit run: | - LAST_CHECKED_COMMIT=$(cat .last-checked-commit 2>/dev/null || git rev-parse --max-parents=0 HEAD) + if [ -f .last-checked-commit ]; then + LAST_CHECKED_COMMIT=$(cat .last-checked-commit) + else + LAST_CHECKED_COMMIT=$(git rev-parse --max-parents=0 HEAD) + fi echo "LAST_CHECKED_COMMIT=$LAST_CHECKED_COMMIT" >> $GITHUB_ENV - - name: Process commits and update blame ignore list + - name: Process commits and update blame ignore list run: | git log ${{ env.LAST_CHECKED_COMMIT }}..HEAD --pretty=format:"%H %s" --grep="\[blame ignore\]" | awk '{print $1}' >> .git-blame-ignore-revs