mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
gitlab-ci: Fix csbuild to run latest 20 commits
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -90,12 +90,12 @@ fedora/csbuild:
|
|||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
# Check if the commit exists in this branch
|
# Check if the commit exists in this branch
|
||||||
# This is not the case for a force push
|
# 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"
|
export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user