-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a5725f
commit f36ea47
Showing
3 changed files
with
36 additions
and
0 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
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
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Move to the root directory of the project | ||
cd -- "$(dirname $0)/.." | ||
|
||
# Update GraphQL schema files | ||
npm run graphql:update || exit 1 | ||
|
||
# Check if GraphQL schema files changed | ||
CHANGED=$(git status --porcelain | grep 'schema') | ||
if [ -n "${CHANGED}" ] ; then | ||
echo "GraphQL schema files are not up to date. Please run 'npm run graphql:update'" | ||
echo "-------- FILES --------" | ||
git status | ||
echo "-------- DIFF --------" | ||
git --no-pager diff | ||
exit 1 | ||
else | ||
echo "GraphQL schema is up to date." | ||
fi |