parent
aa14b270a0
commit
21a97faf4d
14
lib
14
lib
|
@ -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' \
|
||||||
|
|
Loading…
Reference in New Issue