From b602dad93c0a332728fe2f89ce0b2834df2d233d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 22 May 2023 11:43:12 +0200 Subject: [PATCH] add a default value to $current_branch --- variables.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/variables.sh b/variables.sh index 7187d7b..2f04475 100755 --- a/variables.sh +++ b/variables.sh @@ -9,6 +9,11 @@ ARCH="$(echo $CUSTOM_ENV_CI_RUNNER_EXECUTABLE_ARCH | cut -d'/' -f2)" # linux/amd DEFAULT_BRANCH="$CUSTOM_ENV_CI_DEFAULT_BRANCH" CURRENT_BRANCH="$CUSTOM_ENV_CI_COMMIT_REF_NAME" # CUSTOM_ENV_CI_COMMIT_REF_NAME is the target branch of the MR +if [ -z "$CURRENT_BRANCH" ] +then + CURRENT_BRANCH="dev" +fi + LAST_CHANGELOG_ENTRY=$(curl https://gitlab.com/yunohost/yunohost/-/raw/$CURRENT_BRANCH/debian/changelog --silent | head -n 1) # yunohost (4.2) unstable; urgency=low CURRENT_VERSION=$(echo $LAST_CHANGELOG_ENTRY | cut -d' ' -f3 | tr -d ';') # stable, testing, unstable