You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pre-push-hook.sh 641B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Copyright (c) 2014-2015 The Bitcoin Core developers
  3. # Distributed under the MIT software license, see the accompanying
  4. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
  5. if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)devrandom/gitian-builder(.git)?$ ]]; then
  6. exit 0
  7. fi
  8. while read LINE; do
  9. set -- A $LINE
  10. if [ "$4" != "refs/heads/master" ]; then
  11. continue
  12. fi
  13. if ! ./contrib/verify-commits/verify-commits.sh $3 > /dev/null 2>&1; then
  14. echo "ERROR: A commit is not signed, can't push"
  15. ./contrib/verify-commits/verify-commits.sh
  16. exit 1
  17. fi
  18. done < /dev/stdin