From ee4b5003cdc5a84a53807569233f1e3d57d231b3 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 21 May 2024 17:10:52 +0200 Subject: [PATCH] Make sure we have the right branch. --- src/octojpack | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/octojpack b/src/octojpack index e0bfd3e..484f365 100755 --- a/src/octojpack +++ b/src/octojpack @@ -3,7 +3,7 @@ # Program name PROGRAM_NAME="Octojpack" PROGRAM_CODE="octojpack" -PROGRAM_VERSION="1.3.1" +PROGRAM_VERSION="1.3.2" PROGRAM_V="1.3" PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}" @@ -1033,7 +1033,11 @@ function setRepository() { # give little notice of progress _echo "[info] Pushing (TO CREATE) changes to (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository" # push to creat the repository (if allowed) - git push -u origin master >/dev/null 2>&1 || return 30 + if [[ "${VDM_PACKAGE_REPO_BRANCH}" == 'default' ]]; then + git push -u origin master >/dev/null 2>&1 || return 30 + else + git push -u origin "${VDM_PACKAGE_REPO_BRANCH:-master}" >/dev/null 2>&1 || return 30 + fi git push --tags >/dev/null 2>&1 || return 30 fi fi @@ -1050,7 +1054,7 @@ function getExistingRepository() { git clone "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23 else # clone the existing repository - git clone -b "${VDM_PACKAGE_REPO_BRANCH}" "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23 + git clone -b "${VDM_PACKAGE_REPO_BRANCH:-master}" "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23 fi # success return 0