Skip to content

Commit fa5cbf2

Browse files
author
MarcoFalke
committed
ci: Properly set COMMIT_RANGE in lint task
1 parent d8bdee0 commit fa5cbf2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ base_template: &BASE_TEMPLATE
2929
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
3030
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
3131
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
32+
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
3233

3334
main_template: &MAIN_TEMPLATE
3435
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out

ci/lint/06_script.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
export LC_ALL=C
88

9-
GIT_HEAD=$(git rev-parse HEAD)
109
if [ -n "$CIRRUS_PR" ]; then
11-
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
10+
COMMIT_RANGE="HEAD~..HEAD"
1211
echo
1312
git log --no-merges --oneline "$COMMIT_RANGE"
1413
echo

0 commit comments

Comments
 (0)