Commit 4a72259d authored by Ben Gamari's avatar Ben Gamari 🐢

gitlab-ci: Fix submodule linting of commits

There is no notion of a base commit when we aren't checking a merge
request. Just check the HEAD commit.
parent b2f106f5
Pipeline #6678 passed with stages
in 434 minutes and 27 seconds
......@@ -79,19 +79,12 @@ ghc-linters:
script:
- git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
- "echo Linting changes between $base..$CI_COMMIT_SHA"
- "echo Linting submodule changes between $base..$CI_COMMIT_SHA"
- submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
dependencies: []
tags:
- lint
lint-submods:
extends: .lint-submods
only:
refs:
- master
- /ghc-[0-9]+\.[0-9]+/
lint-submods-marge:
extends: .lint-submods
only:
......@@ -112,6 +105,16 @@ lint-submods-mr:
variables:
- $CI_MERGE_REQUEST_LABELS =~ /.*wip/marge_bot_batch_merge_job.*/
lint-submods-branch:
extends: .lint-submods
script:
- "echo Linting submodule changes for $CI_COMMIT_SHA"
- submodchecker .git $CI_COMMIT_SHA
only:
refs:
- master
- /ghc-[0-9]+\.[0-9]+/
.lint-changelogs:
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment