- [FIX] Scripts de publicació
This commit is contained in:
@@ -20,7 +20,7 @@ REM Crear ZIP release con mini.exe + DLLs
|
|||||||
tar -a -c -f mini_%PARAM%_windows_release.zip mini.exe bin\*.dll || exit /b 1
|
tar -a -c -f mini_%PARAM%_windows_release.zip mini.exe bin\*.dll || exit /b 1
|
||||||
|
|
||||||
REM Crear ZIP debug solo con mini_debug.exe
|
REM Crear ZIP debug solo con mini_debug.exe
|
||||||
tar -a -c -f mini_%PARAM%_windows_debug.zip mini_debug.exe || exit /b 1
|
tar -a -c -f mini_%PARAM%_windows_debug.zip mini_debug.exe bin\*.dll || exit /b 1
|
||||||
|
|
||||||
echo Paquetes generados:
|
echo Paquetes generados:
|
||||||
echo mini_%PARAM%_windows_release.zip
|
echo mini_%PARAM%_windows_release.zip
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
#if [ -z "$1" ]; then
|
||||||
echo "Uso: $0 <PARAMETRO>"
|
# echo "Uso: $0 <PARAMETRO>"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
GITEA_TOKEN="eb44d9c0142f5038c61c5afd17f5a41177bfaedc"
|
GITEA_TOKEN="eb44d9c0142f5038c61c5afd17f5a41177bfaedc"
|
||||||
|
|
||||||
@@ -13,18 +13,22 @@ if [ -z "$GITEA_TOKEN" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PARAM=$1
|
# Leer versión desde version.h
|
||||||
|
VERSION=$(grep '#define MINI_VERSION' version.h | sed 's/.*"\(.*\)".*/\1/')
|
||||||
|
echo "Versión detectada: $VERSION"
|
||||||
|
|
||||||
|
#PARAM=$1
|
||||||
API="https://gitea.sustancia.synology.me/api/v1"
|
API="https://gitea.sustancia.synology.me/api/v1"
|
||||||
REPO="JailDoctor/mini"
|
REPO="JailDoctor/mini"
|
||||||
|
|
||||||
echo "=== Creando release ${PARAM} en Gitea ==="
|
echo "=== Creando release ${VERSION} en Gitea ==="
|
||||||
|
|
||||||
RELEASE_ID=$(curl -s -X POST "${API}/repos/${REPO}/releases" \
|
RELEASE_ID=$(curl -s -X POST "${API}/repos/${REPO}/releases" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
\"tag_name\": \"${PARAM}\",
|
\"tag_name\": \"${VERSION}\",
|
||||||
\"name\": \"Release ${PARAM}\",
|
\"name\": \"Release ${VERSION}\",
|
||||||
\"draft\": false,
|
\"draft\": false,
|
||||||
\"prerelease\": false
|
\"prerelease\": false
|
||||||
}" | jq -r '.id')
|
}" | jq -r '.id')
|
||||||
@@ -38,10 +42,10 @@ echo "Release creado con ID: $RELEASE_ID"
|
|||||||
|
|
||||||
echo "=== Subiendo artefactos ==="
|
echo "=== Subiendo artefactos ==="
|
||||||
|
|
||||||
for f in mini_${PARAM}_linux_release.tar.gz \
|
for f in mini_${VERSION}_linux_release.tar.gz \
|
||||||
mini_${PARAM}_linux_debug.tar.gz \
|
mini_${VERSION}_linux_debug.tar.gz \
|
||||||
mini_${PARAM}_windows_release.zip \
|
mini_${VERSION}_windows_release.zip \
|
||||||
mini_${PARAM}_windows_debug.zip
|
mini_${VERSION}_windows_debug.zip
|
||||||
do
|
do
|
||||||
echo "Subiendo $f..."
|
echo "Subiendo $f..."
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
|
|||||||
Reference in New Issue
Block a user