Fixed some formating, and updated the git url to use the shorthand url method
This commit is contained in:
parent
370bc19ed7
commit
6ff9913276
@ -3,7 +3,7 @@
|
|||||||
# Program name
|
# Program name
|
||||||
PROGRAM_NAME="Octojpack"
|
PROGRAM_NAME="Octojpack"
|
||||||
PROGRAM_CODE="octojpack"
|
PROGRAM_CODE="octojpack"
|
||||||
PROGRAM_VERSION="1.0.1"
|
PROGRAM_VERSION="1.0.2"
|
||||||
PROGRAM_V="1.0"
|
PROGRAM_V="1.0"
|
||||||
PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}"
|
PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}"
|
||||||
|
|
||||||
@ -316,8 +316,7 @@ function setFiles() {
|
|||||||
local has_files=false
|
local has_files=false
|
||||||
# loop over the repos
|
# loop over the repos
|
||||||
local i=0
|
local i=0
|
||||||
for owner in $(echo "${VDM_CONFIG_DATA}" | jq -r '.files[].owner');
|
for owner in $(echo "${VDM_CONFIG_DATA}" | jq -r '.files[].owner'); do
|
||||||
do
|
|
||||||
# get the config values needed
|
# get the config values needed
|
||||||
# shellcheck disable=SC2015
|
# shellcheck disable=SC2015
|
||||||
[ -n "${owner}" ] && VDM_OWNER="${owner}" || continue
|
[ -n "${owner}" ] && VDM_OWNER="${owner}" || continue
|
||||||
@ -386,7 +385,7 @@ function setFiles() {
|
|||||||
[ -z "${VDM_PACKAGE_VERSION}" ] &&
|
[ -z "${VDM_PACKAGE_VERSION}" ] &&
|
||||||
[ "${VDM_PACKAGE_VERSION_ID}" = "${VDM_ID}" ]; then
|
[ "${VDM_PACKAGE_VERSION_ID}" = "${VDM_ID}" ]; then
|
||||||
# set the package version
|
# set the package version
|
||||||
VDM_PACKAGE_VERSION="${VDM_ZIP_NAME}";
|
VDM_PACKAGE_VERSION="${VDM_ZIP_NAME}"
|
||||||
export VDM_PACKAGE_VERSION
|
export VDM_PACKAGE_VERSION
|
||||||
fi
|
fi
|
||||||
# we have a file
|
# we have a file
|
||||||
@ -502,8 +501,7 @@ function getFileByRelease() {
|
|||||||
}
|
}
|
||||||
# we may have multiple assets (but we only load the first ZIP file we get)
|
# we may have multiple assets (but we only load the first ZIP file we get)
|
||||||
# because we can only have the ${VDM_ID} only once in the xml file
|
# because we can only have the ${VDM_ID} only once in the xml file
|
||||||
for asset_zip_file_name in $(echo "${VDM_API_BUCKET}" | jq -r '.assets[].name');
|
for asset_zip_file_name in $(echo "${VDM_API_BUCKET}" | jq -r '.assets[].name'); do
|
||||||
do
|
|
||||||
# make sure we did not already get a file
|
# make sure we did not already get a file
|
||||||
$has_files && {
|
$has_files && {
|
||||||
# increment
|
# increment
|
||||||
@ -660,8 +658,7 @@ function setLanguages() {
|
|||||||
local has_error
|
local has_error
|
||||||
# loop over the repos
|
# loop over the repos
|
||||||
i=0
|
i=0
|
||||||
for vdm_lang_tag in $(echo "${VDM_CONFIG_DATA}" | jq -r '.languages[].tag');
|
for vdm_lang_tag in $(echo "${VDM_CONFIG_DATA}" | jq -r '.languages[].tag'); do
|
||||||
do
|
|
||||||
# check for errors
|
# check for errors
|
||||||
has_error=false
|
has_error=false
|
||||||
# get the config values needed
|
# get the config values needed
|
||||||
@ -931,7 +928,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 "ssh://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
|
||||||
@ -990,7 +987,7 @@ function getExistingRepository() {
|
|||||||
# little information of progress
|
# little information of progress
|
||||||
_echo "[info] Getting (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository"
|
_echo "[info] Getting (${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}) repository"
|
||||||
# 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 "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 23
|
||||||
# success
|
# success
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -1016,7 +1013,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 "ssh://git@${VDM_PACKAGE_URL}/${VDM_PACKAGE_OWNER}/${VDM_PACKAGE_REPO}.git" >/dev/null 2>&1 || return 29
|
||||||
#success
|
#success
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user