Skip to content

Commit 4d74d5d

Browse files
committed
Check generated code is current from ci.
Rather than committing from ci, print an error if the generated code is out of date. I think reviewing the generated code is an important part of the development process, so would expect the developer to do this before committing.
1 parent 3a77496 commit 4d74d5d

2 files changed

Lines changed: 8 additions & 45 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ jobs:
2121
shell: bash
2222
run: |
2323
make lint
24+
- name: generate
25+
shell: bash
26+
run: |
27+
make generate
28+
if ! git diff --exit-code; then
29+
echo 'Generated files are out of date. Run `make generate` and commit the result.'
30+
exit 1
31+
fi

.github/workflows/generate.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)