summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-08 14:39:27 -0400
committerBen Gamari <ben@smart-cactus.org>2019-06-08 14:40:55 -0400
commit4a72259d6dcc350d37a50064c18ffcafd03233be (patch)
treef5fc59bf0e8eed0f0ab386796bdc899b666897f3 /.gitlab-ci.yml
parentb2f106f5544e4c71bb07df4acb9d2b5ed184a7e3 (diff)
downloadhaskell-4a72259d6dcc350d37a50064c18ffcafd03233be.tar.gz
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.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml19
1 files changed, 11 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 87446222e0..570ea487d6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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"