mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
d415b7261c
fad1c55301
lint: Skip COMMIT_RANGE if no CIRRUS_PR (MarcoFalke) Pull request description: It doesn't make sense to run this for non-PRs, because: * There are known whitespace "violations" in previous commits, so the lint may fail * Once the changes are merged, it is too late to fix them up (force pushes are illegal) * It isn't possible to determine which commits to run on if there is no reference branch (target branch of the pull request) Moreover, the test fails on non-master: * https://github.com/bitcoin/bitcoin/runs/8664441400 Fix all issues by skipping it. ACKs for top commit: hebasto: ACKfad1c55301
, also tested in my personal Cirrus account. Tree-SHA512: be15f00e2b2a9069583833545883e0e5968a33d2455dad59e6fb47c1102b4dd16ef932e9ba945e29e9d941e6c17bd531a02c66b0491097801be6bda476875537
43 lines
1.7 KiB
Bash
Executable file
43 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
export LC_ALL=C
|
|
|
|
GIT_HEAD=$(git rev-parse HEAD)
|
|
if [ -n "$CIRRUS_PR" ]; then
|
|
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
|
|
echo
|
|
git log --no-merges --oneline "$COMMIT_RANGE"
|
|
echo
|
|
test/lint/commit-script-check.sh "$COMMIT_RANGE"
|
|
else
|
|
COMMIT_RANGE="SKIP_EMPTY_NOT_A_PR"
|
|
fi
|
|
export COMMIT_RANGE
|
|
|
|
# This only checks that the trees are pure subtrees, it is not doing a full
|
|
# check with -r to not have to fetch all the remotes.
|
|
test/lint/git-subtree-check.sh src/crypto/ctaes
|
|
test/lint/git-subtree-check.sh src/secp256k1
|
|
test/lint/git-subtree-check.sh src/minisketch
|
|
test/lint/git-subtree-check.sh src/leveldb
|
|
test/lint/git-subtree-check.sh src/crc32c
|
|
test/lint/check-doc.py
|
|
test/lint/all-lint.py
|
|
|
|
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
|
# Sanity check only the last few commits to get notified of missing sigs,
|
|
# missing keys, or expired keys. Usually there is only one new merge commit
|
|
# per push on the master branch and a few commits on release branches, so
|
|
# sanity checking only a few (10) commits seems sufficient and cheap.
|
|
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
|
|
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-git-root
|
|
mapfile -t KEYS < contrib/verify-commits/trusted-keys
|
|
git config user.email "ci@ci.ci"
|
|
git config user.name "ci"
|
|
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys "${KEYS[@]}" &&
|
|
./contrib/verify-commits/verify-commits.py;
|
|
fi
|