Skip to content

Commit

Permalink
[chore] catch if a file was generated and not added to working tree (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#32730)

**Description:**
This changes the check for changes for the `make generate` step. We
check if any files are present that are not checked in.

Co-authored-by: Evan Bradley <[email protected]>
Co-authored-by: Curtis Robert <[email protected]>
  • Loading branch information
3 people committed May 2, 2024
1 parent f5707cd commit 64645c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ jobs:
- name: CodeGen
run: |
make -j2 generate
git diff --exit-code ':!*go.sum' || (echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.' && exit 1)
if [[ -n $(git status -s) ]]; then
echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.'
exit 1
fi
- name: MultimodVerify
run: make multimod-verify
- name: Components dropdown in issue templates
Expand Down

0 comments on commit 64645c1

Please sign in to comment.