aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-02-02 13:04:35 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-02-02 13:04:53 +0100
commit7c93952feccb66254268c110e09797da3d337f7f (patch)
treeccd9bc9db1dde81e392f59a8368510d5b825a7ef
parent4e19efba033167ee530d36e22f404b74b09f7955 (diff)
parentba94426d531d45643e37567412c3f9d97f71ae5f (diff)
Merge #9656: Check verify-commits on pushes to master
ba94426 Test that pushes to bitcoin/bitcoin are signed per verify-commits (Matt Corallo) 3e900ac Require merge commits merge branches on top of other merge commits (Matt Corallo)
-rw-r--r--.travis.yml3
-rwxr-xr-xcontrib/verify-commits/verify-commits.sh3
2 files changed, 5 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 4087a854b4..ccd2490925 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,6 +51,9 @@ before_script:
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
script:
+ - if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then while read LINE; do travis_retry gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys; fi
+ - if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then git fetch --unshallow; fi
+ - if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then contrib/verify-commits/verify-commits.sh; fi
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
- if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh
index cfe4f11a0b..b2cebdf1a0 100755
--- a/contrib/verify-commits/verify-commits.sh
+++ b/contrib/verify-commits/verify-commits.sh
@@ -28,9 +28,10 @@ IS_SIGNED () {
local PARENTS
PARENTS=$(git show -s --format=format:%P $1)
for PARENT in $PARENTS; do
- if IS_SIGNED $PARENT > /dev/null; then
+ if IS_SIGNED $PARENT; then
return 0;
fi
+ break
done
if ! "$HAVE_FAILED"; then
echo "No parent of $1 was signed with a trusted key!" > /dev/stderr