Skip to content

Commit

Permalink
fix: Run schema generation script as module instead (#6441)
Browse files Browse the repository at this point in the history
* Run generation script as module instead

* Fail command if the Python command fails
  • Loading branch information
lucashuy authored Dec 14, 2023
1 parent 821fcb6 commit e6aaa16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ jobs:
python-version: 3.11
- run: make init
- run: |
diff <( cat schema/samcli.json ) <( python schema/make_schema.py; cat schema/samcli.json ) && exit 0 # exit if schema is unchanged
diff <( cat schema/samcli.json ) <( python -m schema.make_schema && cat schema/samcli.json ) && \
echo "No changes found." && \
exit 0 # exit if schema is unchanged
echo "The generated schema differs from that in the PR. Please run 'make schema'."
exit 1
name: Generate and compare the schema
Expand Down

0 comments on commit e6aaa16

Please sign in to comment.