Merge branch 'jt/gitlab-ci-base-fix'
Two CI tasks, whitespace check and style check, work on the difference from the base version and the version being checked, but the base was computed incorrectly in GitLab CI in some cases, which has been corrected. * jt/gitlab-ci-base-fix: ci: fix base commit fallback for check-whitespace and check-style
This commit is contained in:
@@ -216,7 +216,7 @@ check-whitespace:
|
||||
# be defined in all pipelines.
|
||||
script:
|
||||
- |
|
||||
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
|
||||
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
|
||||
./ci/check-whitespace.sh "$R"
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
@@ -236,7 +236,7 @@ check-style:
|
||||
# be defined in all pipelines.
|
||||
script:
|
||||
- |
|
||||
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
|
||||
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
|
||||
./ci/run-style-check.sh "$R"
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
|
||||
Reference in New Issue
Block a user