v1.0.0
continuous-integration/drone/push Build is passing Details

pull/6/head v1.0.0-test3
dmitry.kirdyashkin 2023-07-23 18:38:07 +03:00
parent aa14b270a0
commit 21a97faf4d
1 changed files with 14 additions and 0 deletions

14
lib
View File

@ -14,6 +14,20 @@ function create-commit(){
} }
function create-release(){ function create-release(){
# if [[ -z "${TAG}" ]]; then
# echo "TAG key is not set"
# exit
# fi
if [[ $1 == 'latest' ]]; then
echo "Deleting old latest release"
RELEASE_LIST=$(curl -X GET -Url https://gitea.kdiva.ru/api/v1/repos/modules/sc-items/releases)
LATEST_RELEASE_ID=$(jq -r '.[] | select(.tag_name=="latest") | .id' <<< $RELEASE_LIST)
delete-release $LATEST_RELEASE_ID
delete-tag
RELEASE_TAG="$1"
fi
source ./vars source ./vars
RESPONSE=$(curl \ RESPONSE=$(curl \
-X 'POST' \ -X 'POST' \