Skip to content

Commit

Permalink
show generated source changes in CI failure if found
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Valdron <[email protected]>
  • Loading branch information
michael-valdron committed Oct 18, 2023
1 parent 94a6bc4 commit 135d00e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:

- name: Check index-server code generation
run: |
cd index/server
export GOPATH=$(go env GOPATH)
go install github.com/deepmap/oapi-codegen/cmd/[email protected]
bash codegen.sh
bash index/server/codegen.sh
GEN_DIFFS=$(git diff --name-only --diff-filter=ACMRT | grep .gen.go$ | xargs)
if [[ ! -z "${GEN_DIFFS}" ]]
then
echo "generated source does not match current changes "
for f in ${GEN_DIFFS}; do git diff HEAD -- $f; done
exit 1
fi
Expand Down

0 comments on commit 135d00e

Please sign in to comment.