Skip to content

Commit

Permalink
ci: restrict swagger code purging to own files
Browse files Browse the repository at this point in the history
Currently everything except for the `ent` directory is removed. This
does not scale when adding more generated code. Instead, the swagger
task should only purge its own files (before recreating them).

Signed-off-by: Michael Adler <[email protected]>
  • Loading branch information
michaeladler committed Sep 6, 2023
1 parent 53a9b5f commit 4647643
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ _generate-swagger:
set -euxo pipefail
cd "{{ THISDIR }}/generated"
# clean up
find . -not -name configure_workflow_executor.go -and -not -path "./ent/*" -type f -delete
# remove existing code
for dir in client model northbound southbound; do
find $dir -not -name configure_workflow_executor.go -type f -delete
done

# generate spec (inline anchors)
just -d . --justfile ../spec/justfile generate wfx.swagger.yml
Expand Down

0 comments on commit 4647643

Please sign in to comment.