Skip to content

Commit 6e07bb5

Browse files
committed
Set autocrlf false in pr-checks.yml for Windows
1 parent fc977f3 commit 6e07bb5

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
timeout-minutes: 45
2727

2828
steps:
29+
- name: Prepare git
30+
if: runner.os == 'Windows'
31+
run: git config --global core.autocrlf false
32+
2933
- uses: actions/checkout@v5
3034

3135
- name: Set up Node.js
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
#!/bin/bash
2-
set -eu
3-
4-
# Sanity check that repo is clean to start with
5-
if [ ! -z "$(git status --porcelain)" ]; then
6-
# If we get a fail here then this workflow needs attention...
7-
>&2 echo "Failed: Repo should be clean before testing!"
8-
exit 1
9-
fi
10-
# Wipe the lib directory in case there are extra unnecessary files in there
11-
rm -rf lib
12-
# Generate the JavaScript files
13-
npm run-script build
14-
# Check that repo is still clean
15-
git add -N .
16-
if ! git diff --exit-code; then
17-
# If we get a fail here then the PR needs attention
18-
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
19-
git status
20-
exit 1
21-
fi
22-
echo "Success: JavaScript files are up to date"
1+
#!/bin/bash
2+
set -eu
3+
4+
# Sanity check that repo is clean to start with
5+
if [ ! -z "$(git status --porcelain)" ]; then
6+
# If we get a fail here then this workflow needs attention...
7+
>&2 echo "Failed: Repo should be clean before testing!"
8+
exit 1
9+
fi
10+
11+
# Wipe the lib directory in case there are extra unnecessary files in there
12+
rm -rf lib
13+
# Generate the JavaScript files
14+
npm run-script build
15+
# Check that repo is still clean
16+
git add -N .
17+
if ! git diff --exit-code; then
18+
# If we get a fail here then the PR needs attention
19+
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
20+
git status
21+
exit 1
22+
fi
23+
echo "Success: JavaScript files are up to date"

0 commit comments

Comments
 (0)