diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-03-22 20:53:32 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-03-23 12:37:56 -0400 |
commit | 8d01b57273e72a9a9d4a76a8f3f15f59441ed30a (patch) | |
tree | a040ecc84476d1ced32254e8768a0c5f8ff2d187 | |
parent | 971f4530004868b9a043252d6f25081388d99e0d (diff) | |
download | haskell-8d01b57273e72a9a9d4a76a8f3f15f59441ed30a.tar.gz |
gitlab-ci: Explicitly fetch target branch
`git fetch`, which we used previously, doesn't update the remote
tracking branches.
-rw-r--r-- | .gitlab-ci.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f22354a3f0..7da7c41a96 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,8 +47,8 @@ ghc-linters: stage: lint image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - - git fetch origin - - base="$(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" + - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME + - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)" - "echo Merge base $base" # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) |