From 43a3139d18e1e56d57245cc7ba567ba495a3d929 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Mon, 2 Dec 2024 19:30:24 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20update=20snapshots=E3=81=A7=E3=81=AE?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=8C=E5=8F=8D=E6=98=A0=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [update snapshots] --- .github/workflows/test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0349c884cc..9cac927f55 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -156,15 +156,19 @@ jobs: if: needs.config.outputs.shouldUpdateSnapshots == 'true' run: | git add --intent-to-add tests/ # git diff に表示されるようにする - git diff tests/ # ロギング用 + git status git diff --binary tests/ > patch-${{ matrix.os }}.diff + # quotepathを無効化しないとxargs rmでエラーになる + git -c "core.quotepath=false" ls-files --deleted tests/ > removed-${{ matrix.os }}.txt - name: Upload patch to artifact if: needs.config.outputs.shouldUpdateSnapshots == 'true' uses: actions/upload-artifact@v4 with: name: updated-snapshots-${{ matrix.os }} - path: patch-${{ matrix.os }}.diff + path: + patch-${{ matrix.os }}.diff + removed-${{ matrix.os }}.txt commit-snapshots: runs-on: ubuntu-latest @@ -195,6 +199,7 @@ jobs: git apply --allow-empty $patch rm $patch done + cat patches/removed-*.txt | xargs git rm # 変更があるかチェック if [ -n "$(git status --porcelain)" ]; then