mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-03-03 22:15:26 +01:00
26 lines
571 B
Bash
Executable File
26 lines
571 B
Bash
Executable File
#!/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 ! uv run make templates_check
|
|
then
|
|
echo >&2 "Templates not updated, run 'uv run make templates'. Not pushing."
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "Checking style"
|
|
if ! uv run make style_check
|
|
then
|
|
echo >&2 "Style invalid, run 'uv run make style'. Not pushing."
|
|
exit 2
|
|
fi
|
|
|
|
echo "pre-push hook passed. Pushing."
|