t
parent
0accd0db53
commit
ed0b3fb15d
8
lib
8
lib
|
@ -18,6 +18,7 @@ function create-release(){
|
||||||
RELEASE_LIST=$(curl -X GET -Url https://gitea.kdiva.ru/api/v1/repos/modules/sc-items/releases)
|
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)
|
LATEST_RELEASE_ID=$(jq -r '.[] | select(.tag_name=="latest") | .id' <<< $RELEASE_LIST)
|
||||||
delete-release $LATEST_RELEASE_ID
|
delete-release $LATEST_RELEASE_ID
|
||||||
|
delete-tag
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RESPONSE=$(curl \
|
RESPONSE=$(curl \
|
||||||
|
@ -54,6 +55,13 @@ function delete-release(){
|
||||||
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66'
|
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function delete-tag(){
|
||||||
|
curl \
|
||||||
|
-X 'DELETE' \
|
||||||
|
-Url "https://gitea.kdiva.ru/api/v1/repos/${DRONE_REPO}/tags/latest" \
|
||||||
|
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66'
|
||||||
|
}
|
||||||
|
|
||||||
function vars() {
|
function vars() {
|
||||||
echo "DRONE_SEMVER $DRONE_SEMVER"
|
echo "DRONE_SEMVER $DRONE_SEMVER"
|
||||||
echo "DRONE_REPO_LINK $DRONE_REPO_LINK"
|
echo "DRONE_REPO_LINK $DRONE_REPO_LINK"
|
||||||
|
|
Loading…
Reference in New Issue