mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 09:53:47 +01:00
ci: Properly set COMMIT_RANGE in lint task
This commit is contained in:
parent
d8bdee0fc8
commit
fa5cbf2290
@ -29,6 +29,7 @@ base_template: &BASE_TEMPLATE
|
|||||||
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
||||||
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
||||||
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
|
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
|
||||||
|
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
|
||||||
|
|
||||||
main_template: &MAIN_TEMPLATE
|
main_template: &MAIN_TEMPLATE
|
||||||
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
|
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
GIT_HEAD=$(git rev-parse HEAD)
|
|
||||||
if [ -n "$CIRRUS_PR" ]; then
|
if [ -n "$CIRRUS_PR" ]; then
|
||||||
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
|
COMMIT_RANGE="HEAD~..HEAD"
|
||||||
echo
|
echo
|
||||||
git log --no-merges --oneline "$COMMIT_RANGE"
|
git log --no-merges --oneline "$COMMIT_RANGE"
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user