Compare commits
No commits in common. "main" and "v1.0.0-test3" have entirely different histories.
main
...
v1.0.0-tes
|
@ -1 +1 @@
|
||||||
Subproject commit a457525145ba1d5ad3b1762c40056b6316099b21
|
Subproject commit 153edfd6d4c91aa957c0b14171f5c676aa4cd58a
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function create-archive(){
|
||||||
|
mkdir release
|
||||||
|
envsubst < module.json.template > ./module.json
|
||||||
|
cp ./module.json ./src/module.json
|
||||||
|
zip -r -9 ./release/module.zip ./src/*
|
||||||
|
}
|
||||||
|
|
||||||
|
function create-commit(){
|
||||||
|
git add .
|
||||||
|
git commit -m 'update'
|
||||||
|
git push origin $DRONE_BRANCH
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
RESPONSE=$(curl \
|
||||||
|
-X 'POST' \
|
||||||
|
-Url "https://gitea.kdiva.ru/api/v1/repos/${DRONE_REPO}/releases" \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66' \
|
||||||
|
-d '{
|
||||||
|
"draft": false,
|
||||||
|
"name": "'"release $RELEASE_TAG"'",
|
||||||
|
"prerelease": false,
|
||||||
|
"tag_name": "'"$RELEASE_TAG"'",
|
||||||
|
"target_commitish": "'"$COMMIT_SHA"'"
|
||||||
|
}')
|
||||||
|
}
|
||||||
|
|
||||||
|
function upload-attachments(){
|
||||||
|
RELEASE_ID=$(jq -r '.id' <<< $RESPONSE)
|
||||||
|
echo "RELEASE_ID is ${RELEASE_ID}"
|
||||||
|
curl \
|
||||||
|
-vv \
|
||||||
|
-X 'POST' \
|
||||||
|
-Url "https://gitea.kdiva.ru/api/v1/repos/${DRONE_REPO}/releases/${RELEASE_ID}/assets" \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H 'Content-Type: multipart/form-data' \
|
||||||
|
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66' \
|
||||||
|
-F "attachment=@$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete-release(){
|
||||||
|
curl \
|
||||||
|
-X 'DELETE' \
|
||||||
|
-Url "https://gitea.kdiva.ru/api/v1/repos/${DRONE_REPO}/releases/${1}" \
|
||||||
|
-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'
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"id": "sc-items",
|
||||||
|
"name": "shared-compendia-items",
|
||||||
|
"title": "Shared Compendia Items",
|
||||||
|
"description": "Item list",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "leego neit"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "v1.0.5-dev",
|
||||||
|
"minimumCoreVersion": "9",
|
||||||
|
"compatibility": {
|
||||||
|
"minimum": "9",
|
||||||
|
"verified": "10",
|
||||||
|
"maximum": "10"
|
||||||
|
},
|
||||||
|
"url": "https://gitea.kdiva.ru/modules/sc-items",
|
||||||
|
"manifest": "https://gitea.kdiva.ru/modules/sc-items/raw/branch/dev/module.json",
|
||||||
|
"download": "https://gitea.kdiva.ru/modules/sc-items/releases/download/v1.0.5-dev/module.zip",
|
||||||
|
"packs": [
|
||||||
|
{
|
||||||
|
"name": "sc-items",
|
||||||
|
"label": "sc items",
|
||||||
|
"path": "packs/sc-items.db",
|
||||||
|
"entity": "Item",
|
||||||
|
"type": "Item",
|
||||||
|
"module": "shared-compendia-items",
|
||||||
|
"system": "dnd5e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sc-items-aota",
|
||||||
|
"label": "arcana of the ancients items",
|
||||||
|
"path": "packs/sc-items-aota.db",
|
||||||
|
"entity": "Item",
|
||||||
|
"type": "Item",
|
||||||
|
"module": "shared-compendia-items",
|
||||||
|
"system": "dnd5e"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -12,15 +12,12 @@
|
||||||
"minimumCoreVersion": "9",
|
"minimumCoreVersion": "9",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "9",
|
"minimum": "9",
|
||||||
"verified": "11",
|
"verified": "10",
|
||||||
"maximum": "11"
|
"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",
|
||||||
"styles": [
|
|
||||||
"styles/item-card.css"
|
|
||||||
],
|
|
||||||
"packs": [
|
"packs": [
|
||||||
{
|
{
|
||||||
"name": "sc-items",
|
"name": "sc-items",
|
||||||
|
|
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.4 KiB |