2018-06-20 11:54:54 +02:00
|
|
|
#!/usr/bin/env bash
|
2016-09-11 21:36:22 +02:00
|
|
|
# Copyright (c) 2014-2015 The Bitcoin Core developers
|
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-06-13 16:50:48 +02:00
|
|
|
export LC_ALL=C
|
2015-10-23 04:50:01 +02:00
|
|
|
if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then
|
2014-10-27 08:07:25 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
while read LINE; do
|
|
|
|
set -- A $LINE
|
|
|
|
if [ "$4" != "refs/heads/master" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
2018-05-10 18:22:58 +02:00
|
|
|
if ! ./contrib/verify-commits/verify-commits.py $3 > /dev/null 2>&1; then
|
2014-10-27 08:07:25 +01:00
|
|
|
echo "ERROR: A commit is not signed, can't push"
|
2018-05-10 18:22:58 +02:00
|
|
|
./contrib/verify-commits/verify-commits.py
|
2014-10-27 08:07:25 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done < /dev/stdin
|