diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-11-30 18:33:40 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-11-30 18:52:40 +0100 |
commit | 4282f3c664b6deb49fc968b9ea0f09ed67e7cefc (patch) | |
tree | a083f3d6253eebb39e0784dc6c862404364f0eee | |
parent | 3784226fd85bc1256ef927640f4d400348da038f (diff) | |
download | libssh-4282f3c664b6deb49fc968b9ea0f09ed67e7cefc.tar.gz libssh-4282f3c664b6deb49fc968b9ea0f09ed67e7cefc.tar.xz libssh-4282f3c664b6deb49fc968b9ea0f09ed67e7cefc.zip |
gitlab-ci: Fix csbuild to run latest 20 commits
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-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 060d46a2..169135a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,12 +90,12 @@ fedora/csbuild: script: - | if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then - export CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD~20) + export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") fi # Check if the commit exists in this branch # This is not the case for a force push - git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD^) + git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" |