summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-02-18 15:38:56 +0100
committerTim Rühsen <tim.ruehsen@gmx.de>2019-02-18 15:38:56 +0100
commit8521a12223d317cf97553b532b1d630f93739f28 (patch)
tree33e36525b74f48a7307aadfdd5059305aec0cf01 /devel
parentcc875c0a1862845d44dff12319dbb49a50c8bd7c (diff)
downloadgnutls-8521a12223d317cf97553b532b1d630f93739f28.tar.gz
check_if_signed: Get source branch if not set
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/check_if_signed5
1 files changed, 5 insertions, 0 deletions
diff --git a/devel/check_if_signed b/devel/check_if_signed
index a053bbc0c8..b8b4fef112 100755
--- a/devel/check_if_signed
+++ b/devel/check_if_signed
@@ -7,6 +7,11 @@ fi
echo "target=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
echo "source=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
+if test -z "$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"; then
+ CI_MERGE_REQUEST_SOURCE_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
+ echo "branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
+fi
+
# create list of commits of the current branch
commits=$(git rev-list --no-merges $CI_MERGE_REQUEST_TARGET_BRANCH_NAME..$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME)