[Git][ghc/ghc][master] gitlab-ci: Fix submodule linting of commits

Ben Gamari gitlab at gitlab.haskell.org
Sat Jun 8 18:41:04 UTC 2019



Ben Gamari pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
4a72259d by Ben Gamari at 2019-06-08T18:40:55Z
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.

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.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"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4a72259d6dcc350d37a50064c18ffcafd03233be

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4a72259d6dcc350d37a50064c18ffcafd03233be
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190608/a34e58e7/attachment-0001.html>


More information about the ghc-commits mailing list