Skip to content

Commit 4931a8d

Browse files
committed
workflows: git diff returns 1 on diff opposed to error
1 parent 44b33c7 commit 4931a8d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/commands/setupCopilot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const failOnError = process.env.FAIL_ON_ERROR === 'true'
2323

2424
// Save some time by skipping old versions as we are not parallelizing builds
2525
const versions = require('../../versions.json')
26-
const SKIP_VERSIONS = versions.slice(0, versions.indexOf('1.21.3'))
26+
const SKIP_VERSIONS = versions.slice(0, -2) // all but last 2 versions
2727

2828
async function main () {
2929

.github/workflows/copilot-setup-steps.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,10 @@ jobs:
6767
ref: client${{ steps.sb.outputs.second_latest_version }}
6868
fetch-depth: 1
6969

70+
- run: ls mc-source
71+
7072
- name: Write diff
71-
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
73+
# NOTE: this returns exit code 1 if there are differences
74+
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
75+
working-directory: mc-source
76+
continue-on-error: true

0 commit comments

Comments
 (0)