From 4931a8dadc8248ec6a65aaa7483b142942ae98b2 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 6 Sep 2025 23:08:16 +0000 Subject: [PATCH] workflows: git diff returns 1 on diff opposed to error --- .github/commands/setupCopilot.js | 2 +- .github/workflows/copilot-setup-steps.yml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/commands/setupCopilot.js b/.github/commands/setupCopilot.js index c6cce81..54ebcd5 100644 --- a/.github/commands/setupCopilot.js +++ b/.github/commands/setupCopilot.js @@ -23,7 +23,7 @@ const failOnError = process.env.FAIL_ON_ERROR === 'true' // Save some time by skipping old versions as we are not parallelizing builds const versions = require('../../versions.json') -const SKIP_VERSIONS = versions.slice(0, versions.indexOf('1.21.3')) +const SKIP_VERSIONS = versions.slice(0, -2) // all but last 2 versions async function main () { diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 7e3193f..993fcd6 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -67,5 +67,10 @@ jobs: ref: client${{ steps.sb.outputs.second_latest_version }} fetch-depth: 1 + - run: ls mc-source + - name: Write diff - run: cd mc-source && git diff --no-index ${{ steps.sb.outputs.second_latest_version }} ${{ steps.sb.outputs.latest_version }} > ${{ steps.sb.outputs.second_latest_version }}_to_${{ steps.sb.outputs.latest_version }}.diff + # NOTE: this returns exit code 1 if there are differences + run: git diff --no-index ${{ steps.sb.outputs.second_latest_version }} ${{ steps.sb.outputs.latest_version }} > ${{ steps.sb.outputs.second_latest_version }}_to_${{ steps.sb.outputs.latest_version }}.diff + working-directory: mc-source + continue-on-error: true \ No newline at end of file