You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/docs/git/hooks/pre-push

26 lines
587 B

#!/bin/sh
# Runs a simple check before pushing. In particular, this checks
# if templates were regenerated and style is correct.
echo "Running pre-push git hook."
# Runs check for common simple errors before pushing
echo ""
echo "Checking templates"
if ! pipenv run make templates_check
then
echo >&2 "Templates not updated, run 'pipenv run make templates'. Not pushing."
exit 1
fi
echo ""
echo "Checking style"
if ! pipenv run make style_check
then
echo >&2 "Style invalid, run 'pipenv run make style'. Not pushing."
exit 2
fi
echo "pre-push hook passed. Pushing."