ratatui/.cargo-husky/hooks/pre-push
SLASHLogin 669a4d5652
build: add git pre-push hooks using cargo-husky (#274)
Fixes https://github.com/tui-rs-revival/ratatui/issues/214
- add cargo-husky to dev-deps
- create hook
- update `CONTRIBUTING.md`
- ensure that the hook is not installed in CI
2023-06-24 06:03:31 +00:00

16 lines
536 B
Bash
Executable file

#!/usr/bin/env bash
if !(command cargo-make >/dev/null 2>&1); then # Check if cargo-make is installed
echo Attempting to run cargo-make as part of the pre-push hook but it\'s not installed.
echo Please install it by running the following command:
echo
echo " cargo install --force cargo-make"
echo
echo If you don\'t want to run cargo-make as part of the pre-push hook, you can run
echo the following command instead of git push:
echo
echo " git push --no-verify"
exit 1
fi
cargo make ci