ceremonyclient/go-libp2p/.githooks/pre-commit

14 lines
247 B
Plaintext
Raw Normal View History

2023-08-21 03:50:38 +00:00
#!/bin/bash
pushd ./test-plans > /dev/null
go mod tidy
if [[ -n $(git diff --name-only -- "go.mod" "go.sum") ]]; then
echo "go.mod / go.sum in test-plans not tidied"
errored=true
fi
popd > /dev/null
if [ "$errored" = true ]; then
exit 1
fi