ci: Do not print git log for empty COMMIT_RANGE

This commit is contained in:
Hennadii Stepanov 2021-11-07 17:04:06 +02:00
parent 77a2f5d30c
commit 095f07744c
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -8,8 +8,8 @@ export LC_ALL=C
GIT_HEAD=$(git rev-parse HEAD)
if [ -n "$CIRRUS_PR" ]; then
COMMIT_RANGE="$CIRRUS_BASE_SHA..$GIT_HEAD"
test/lint/commit-script-check.sh $COMMIT_RANGE
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
test/lint/commit-script-check.sh "$COMMIT_RANGE"
fi
export COMMIT_RANGE
@ -34,5 +34,7 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
./contrib/verify-commits/verify-commits.py;
fi
if [ -n "$COMMIT_RANGE" ]; then
echo
git log --no-merges --oneline $COMMIT_RANGE
git log --no-merges --oneline "$COMMIT_RANGE"
fi