publish script update
This commit is contained in:
+5
-5
@@ -34,9 +34,9 @@ function gitea_publish
|
|||||||
if [ ! -f "${_PACKAGE_DOWNLOAD}${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip" ]; then
|
if [ ! -f "${_PACKAGE_DOWNLOAD}${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip" ]; then
|
||||||
echo "> Download: ${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip";
|
echo "> Download: ${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip";
|
||||||
curl -LJO \
|
curl -LJO \
|
||||||
--output-dir "${_PACKAGE_DOWNLOAD}" \
|
--output-dir "${_PACKAGE_DOWNLOAD}" \
|
||||||
-H "Authorization: token ${_GITEA_TOKEN}" \
|
-H "Authorization: token ${_GITEA_TOKEN}" \
|
||||||
"${_GITEA_URL_DL}/v${_VERSION}.zip";
|
"${_GITEA_URL_DL}/v${_VERSION}.zip";
|
||||||
fi;
|
fi;
|
||||||
# if this is the short name, if long down load does not work
|
# if this is the short name, if long down load does not work
|
||||||
if [ -f "${_PACKAGE_DOWNLOAD}v${_VERSION}.zip" ]; then
|
if [ -f "${_PACKAGE_DOWNLOAD}v${_VERSION}.zip" ]; then
|
||||||
@@ -46,8 +46,8 @@ function gitea_publish
|
|||||||
echo "[!] Package file does not exist for version: ${_VERSION}";
|
echo "[!] Package file does not exist for version: ${_VERSION}";
|
||||||
else
|
else
|
||||||
response=$(curl --user "${_GITEA_USER}":"${_GITEA_TOKEN}" \
|
response=$(curl --user "${_GITEA_USER}":"${_GITEA_TOKEN}" \
|
||||||
--upload-file "${_PACKAGE_DOWNLOAD}${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip" \
|
--upload-file "${_PACKAGE_DOWNLOAD}${_GITEA_UPLOAD_FILENAME}-v${_VERSION}.zip" \
|
||||||
"${_GITEA_URL_PUSH}"?version="${_VERSION}");
|
"${_GITEA_URL_PUSH}"?version="${_VERSION}");
|
||||||
status=$(echo "${response}" | jq .errors[].status);
|
status=$(echo "${response}" | jq .errors[].status);
|
||||||
message=$(echo "${response}" | jq .errors[].message);
|
message=$(echo "${response}" | jq .errors[].message);
|
||||||
if [ -n "${status}" ]; then
|
if [ -n "${status}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user