Compare commits
7 Commits
339d6bacd5
...
04191ab8fb
Author | SHA1 | Date |
---|---|---|
dmitry.kirdyashkin | 04191ab8fb | |
dmitry.kirdyashkin | ffd626cb1f | |
dmitry.kirdyashkin | 06e89473d8 | |
dmitry.kirdyashkin | 21a97faf4d | |
dmitry.kirdyashkin | aa14b270a0 | |
dmitry.kirdyashkin | c3ceacd841 | |
dmitry.kirdyashkin | 7341050223 |
|
@ -3,6 +3,3 @@ kind: template
|
||||||
load: new-release.yaml
|
load: new-release.yaml
|
||||||
data:
|
data:
|
||||||
image: gitea.kdiva.ru/infrastructure/archiver:latest
|
image: gitea.kdiva.ru/infrastructure/archiver:latest
|
||||||
|
|
||||||
trigger:
|
|
||||||
event: push
|
|
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' \
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"maximum": "10"
|
"maximum": "10"
|
||||||
},
|
},
|
||||||
"url": "${DRONE_REPO_LINK}",
|
"url": "${DRONE_REPO_LINK}",
|
||||||
"manifest": "${DRONE_REPO_LINK}/raw/branch/${DRONE_BRANCH}/module.json",
|
"manifest": "${DRONE_REPO_LINK}/releases/download/latest/module.json",
|
||||||
"download": "${DRONE_REPO_LINK}/releases/download/$RELEASE_TAG/module.zip",
|
"download": "${DRONE_REPO_LINK}/releases/download/$RELEASE_TAG/module.zip",
|
||||||
"packs": [
|
"packs": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue