mirror of
https://github.com/benjaminion/upgrading-ethereum-book.git
synced 2026-01-10 23:17:55 -05:00
17 lines
368 B
Bash
Executable File
17 lines
368 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Run the checks only if file `book.md` is staged
|
|
if git diff --exit-code -s --staged src/book.md
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
# Run the pre-build checks on the book source
|
|
node --input-type=module -e 'import runChecks from "./bin/build/prebuild.js"; runChecks()'
|
|
|
|
if [ "$?" != "0" ]
|
|
then
|
|
echo "\nError: Not committing due to failed checks.\n" >&2
|
|
exit 1
|
|
fi
|