openethereum/scripts/hook.sh
2020-02-29 11:57:43 +01:00

13 lines
282 B
Bash
Executable File

#!/usr/bin/env sh
FILE=./.git/hooks/pre-push
echo "#!/bin/sh\n" > $FILE
# Exit on any error
echo "set -e" >> $FILE
# Run release build
echo "cargo build --features dev" >> $FILE
# Build tests
echo "cargo test --no-run --features dev --all" >> $FILE
echo "" >> $FILE
chmod +x $FILE