github.com/ethersphere/bee/v2@v2.2.0/.githooks/pre-push.bash (about) 1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 # Get current branch name 6 current=$(git rev-parse --abbrev-ref HEAD) 7 if git branch -r | grep "^ ${1}/${current}$" &> /dev/null; then 8 # Check if we actually have commits to push 9 commits=$(git log @{u}..) 10 if [ -z "$commits" ]; then 11 exit 0 12 fi 13 fi 14 15 make build lint vet test-race