Make sure we have the right branch.

This commit is contained in:
Llewellyn van der Merwe 2024-05-21 17:10:52 +02:00
parent 5aa4369f83
commit ee4b5003cd
Signed by: Llewellyn
GPG Key ID: A9201372263741E7

View File

@ -3,7 +3,7 @@
# Program name # Program name
PROGRAM_NAME="Octojpack" PROGRAM_NAME="Octojpack"
PROGRAM_CODE="octojpack" PROGRAM_CODE="octojpack"
PROGRAM_VERSION="1.3.1" PROGRAM_VERSION="1.3.2"
PROGRAM_V="1.3" PROGRAM_V="1.3"
PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}" PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}"
@ -1033,7 +1033,11 @@ function setRepository() {
# give little notice of progress # give little notice of progress
_echo "[info] Pushing (TO CREATE) changes to (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository" _echo "[info] Pushing (TO CREATE) changes to (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository"
# push to creat the repository (if allowed) # push to creat the repository (if allowed)
if [[ "${VDM_PACKAGE_REPO_BRANCH}" == 'default' ]]; then
git push -u origin master >/dev/null 2>&1 || return 30 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 git push --tags >/dev/null 2>&1 || return 30
fi fi
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 git clone "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23
else else
# clone the existing repository # 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 fi
# success # success
return 0 return 0