2022-12-10 10:40:01 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# See https://github.com/rhysd/cargo-husky#readme
|
|
|
|
#
|
|
|
|
|
2023-08-15 22:41:30 +03:00
|
|
|
echo "----------------------------------------------------------------------------------------"
|
|
|
|
echo "These tests run automatically before the git push"
|
|
|
|
echo "If you want to push your changes without testing them first, use git push --no-verify"
|
2023-12-25 07:43:58 +03:00
|
|
|
echo "To simplify this, create an alias, e.g. like so:"
|
|
|
|
echo " git config --global alias.pushn 'push --no-verify'"
|
|
|
|
echo "Then you can use git pushn to push without testing"
|
2023-08-15 22:41:30 +03:00
|
|
|
echo "----------------------------------------------------------------------------------------"
|
|
|
|
|
2022-12-10 10:40:01 +03:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if ! command -v just > /dev/null; then
|
2023-08-15 22:43:26 +03:00
|
|
|
echo "Command 'just' is not installed. See https://github.com/casey/just#readme for installation instructions, or use"
|
2022-12-10 10:40:01 +03:00
|
|
|
echo ""
|
2024-02-27 10:40:20 +03:00
|
|
|
echo " cargo install just --locked"
|
2022-12-10 10:40:01 +03:00
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+just git-pre-push"
|
|
|
|
just git-pre-push
|