From f480b6f1f32777132ee0d73ab06e6fd8084109dd Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 23 Apr 2025 20:22:24 +0200 Subject: [PATCH] Update version to 1.3.7 and fix shell script logic handling Incremented the program version to 1.3.7. Adjusted shell logic in repository handling for better compatibility and correctness by enforcing explicit boolean checks and improving syntax. --- src/octojpack | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/octojpack b/src/octojpack index 6a700fe..53778ff 100755 --- a/src/octojpack +++ b/src/octojpack @@ -3,7 +3,7 @@ # Program name PROGRAM_NAME="Octojpack" PROGRAM_CODE="octojpack" -PROGRAM_VERSION="1.3.6" +PROGRAM_VERSION="1.3.7" PROGRAM_V="1.3" PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}" @@ -995,7 +995,7 @@ function setRepository() { # check if the repository exist on our gitea instance local update_repo # shellcheck disable=SC2015 - if git ls-remote --exit-code --heads "git@${VDM_PACKAGE_URL}:${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" -q >/dev/null 2>&1; then + if git ls-remote --exit-code --heads "git@${VDM_PACKAGE_URL}:${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1; then getExistingRepository || return 23 update_repo=true else @@ -1009,11 +1009,11 @@ function setRepository() { # move all new files into repository setRepositoryNewFiles || return 27 # check if we have changes - if $update_repo && [[ -z $(git status --porcelain) ]]; then + if [[ "${update_repo}" == true && -z $(git status --porcelain) ]]; then _echo "[info] No changes found in (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository" else # check if we must update or create repository - if $update_repo; then + if [[ "${update_repo}" == true ]]; then # make API call callGiteaAPI "tags" "${VDM_PACKAGE_OWNER}" "${VDM_PACKAGE_REPO}" "${VDM_PACKAGE_API}" "${VDM_PACKAGE_TOKEN}" || return 28 # check if tag exists