Update version to 1.3.5 and simplify Git URLs.

Bumped the program version to 1.3.5. Replaced [ssh://] prefix in Git URLs with a simplified [git@] format for consistency and cleaner usage. This ensures uniformity across Git operations.
This commit is contained in:
2025-04-23 17:47:24 +02:00
parent 3e0cdc9628
commit 288f45832c

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.4" PROGRAM_VERSION="1.3.5"
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}"
@ -995,7 +995,7 @@ function setRepository() {
# check if the repository exist on our gitea instance # check if the repository exist on our gitea instance
local update_repo local update_repo
# shellcheck disable=SC2015 # shellcheck disable=SC2015
if git ls-remote "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" -q >/dev/null 2>&1; then if git ls-remote "git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" -q >/dev/null 2>&1; then
getExistingRepository || return 23 getExistingRepository || return 23
update_repo=true update_repo=true
else else
@ -1059,10 +1059,10 @@ function getExistingRepository() {
_echo "[info] Getting (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository" _echo "[info] Getting (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository"
if [[ "${VDM_PACKAGE_REPO_BRANCH}" == 'default' ]]; then if [[ "${VDM_PACKAGE_REPO_BRANCH}" == 'default' ]]; then
# clone the existing repository # clone the existing repository
git clone "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23 git clone "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:-master}" "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}" "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
@ -1091,7 +1091,7 @@ function setGitRepository() {
# little information of progress # little information of progress
_echo "[info] Adding remote branch to (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository" _echo "[info] Adding remote branch to (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository"
# add the remote branch # add the remote branch
git remote add origin "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 29 git remote add origin "git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 29
# Check if a specific branch is set and it is not 'default' # Check if a specific branch is set and it is not 'default'
if [ "${VDM_PACKAGE_REPO_BRANCH}" != "default" ]; then if [ "${VDM_PACKAGE_REPO_BRANCH}" != "default" ]; then
_echo "[info] Setting branch to ${VDM_PACKAGE_REPO_BRANCH}" _echo "[info] Setting branch to ${VDM_PACKAGE_REPO_BRANCH}"