-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: break out json schema drift check into separate script
Signed-off-by: Alex Goodman <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -u | ||
|
||
if ! git diff-index --quiet HEAD --; then | ||
git diff-index HEAD -- | ||
echo "there are uncommitted changes, please commit them before running this check" | ||
exit 1 | ||
fi | ||
|
||
success=true | ||
|
||
if ! make generate-json-schema; then | ||
echo "Generating json schema failed" | ||
success=false | ||
fi | ||
|
||
if ! git diff-index --quiet HEAD --; then | ||
git diff-index HEAD -- | ||
echo "JSON schema drift detected!" | ||
success=false | ||
fi | ||
|
||
if ! $success; then | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters