Skip to content

Commit 3403e4c

Browse files
authored
chore: fix update api script exit on error (microsoft#634)
1 parent 1894c6b commit 3403e4c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@ jobs:
3333
uses: pre-commit/action@v2.0.0
3434
- name: Generate APIs
3535
run: bash scripts/update_api.sh
36-
- name: Verify API is up to date
37-
run: |
38-
if [[ -n $(git status -s) ]]; then
39-
echo "ERROR: generated code differ from the current sources:"
40-
git diff
41-
exit 1
42-
fi
36+
- name: Verify generated API is up to date
37+
run: git diff --exit-code
4338
build:
4439
name: Build
4540
timeout-minutes: 30

scripts/update_api.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function update_api {
1414
echo "Regenerated APIs"
1515
else
1616
echo "Exited due to errors"
17+
exit 1
1718
fi
1819
}
1920

0 commit comments

Comments
 (0)