Compare commits
No commits in common. "04191ab8fb4ce5023c1fb28817ef1efa99120c15" and "339d6bacd5f139d2ee79c9533f37ff2f82887a02" have entirely different histories.
04191ab8fb
...
339d6bacd5
|
@ -3,3 +3,6 @@ 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,20 +14,6 @@ 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}/releases/download/latest/module.json",
|
"manifest": "${DRONE_REPO_LINK}/raw/branch/${DRONE_BRANCH}/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