gitlab-ci: Fetch submodules before running submodule linter
authorBen Gamari <ben@smart-cactus.org>
Sun, 9 Jun 2019 16:31:32 +0000 (12:31 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 12 Jun 2019 12:20:25 +0000 (08:20 -0400)
.gitlab-ci.yml

index 14f5c0f..912d057 100644 (file)
@@ -80,6 +80,7 @@ ghc-linters:
     - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
     - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
     - "echo Linting submodule changes between $base..$CI_COMMIT_SHA"
+    - git submodule foreach git remote update
     - submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
   dependencies: []
   tags:
@@ -109,6 +110,7 @@ lint-submods-branch:
   extends: .lint-submods
   script:
     - "echo Linting submodule changes between $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
+    - git submodule foreach git remote update
     - submodchecker .git $(git rev-list $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA)
   only:
     refs: