2018-06-24 16:41:58 +02:00
|
|
|
#!/usr/bin/env bash
|
2023-08-16 19:27:31 +02:00
|
|
|
# Copyright (c) 2014-2020 The Bitcoin Core developers
|
2016-09-20 09:56:14 +02:00
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-06-18 13:12:07 +02:00
|
|
|
export LC_ALL=C
|
2016-03-04 08:25:16 +01:00
|
|
|
if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)dashpay/dash(.git)?$ ]]; then
|
2014-10-27 08:07:25 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
while read LINE; do
|
2024-11-23 11:10:59 +01:00
|
|
|
set -- A "$LINE"
|
2014-10-27 08:07:25 +01:00
|
|
|
if [ "$4" != "refs/heads/master" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
2024-11-23 11:10:59 +01: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-06-12 17:23:37 +02:00
|
|
|
./contrib/verify-commits/verify-commits.py
|
2014-10-27 08:07:25 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done < /dev/stdin
|