feature/generador-instaladores-linux-windows
This commit is contained in:
34
packaging/scripts/build-all.sh
Normal file → Executable file
34
packaging/scripts/build-all.sh
Normal file → Executable file
@@ -1,34 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Genera ambos artefactos: Linux (local/Docker) y Windows (PowerShell + Python en Windows).
|
||||
# Wrapper de compatibilidad: el orquestador canónico vive en la raíz del repo.
|
||||
# Ejecuta ./build-all.sh (desde WSL) para generar Windows + Linux + paquetes.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
RELEASE="$ROOT/dist/release"
|
||||
mkdir -p "$RELEASE"
|
||||
|
||||
echo "=== Build Linux ==="
|
||||
if [[ -f "$ROOT/build.sh" ]]; then
|
||||
bash "$ROOT/build.sh"
|
||||
cp -f "$ROOT/dist/CloudRestoreAS" "$RELEASE/CloudRestoreAS-linux"
|
||||
chmod +x "$RELEASE/CloudRestoreAS-linux"
|
||||
fi
|
||||
|
||||
echo "=== Build Windows (via PowerShell) ==="
|
||||
WSL_PATH=$(wslpath -w "$ROOT" 2>/dev/null || echo "")
|
||||
if [[ -n "$WSL_PATH" ]] && command -v powershell.exe >/dev/null 2>&1; then
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "
|
||||
Set-Location '$WSL_PATH'
|
||||
& 'C:\Users\Hugo Reyes\AppData\Local\Programs\Python\Python313\python.exe' -m pip install -q -r requirements-windows.txt 2>\$null
|
||||
& .\build.ps1
|
||||
"
|
||||
if [[ -f "$ROOT/dist/CloudRestoreAS.exe" ]]; then
|
||||
cp -f "$ROOT/dist/CloudRestoreAS.exe" "$RELEASE/CloudRestoreAS.exe"
|
||||
fi
|
||||
else
|
||||
echo "Omitido: ejecute build.ps1 en Windows manualmente"
|
||||
fi
|
||||
|
||||
cp -f "$ROOT/packaging/LEEME.txt" "$RELEASE/"
|
||||
echo ""
|
||||
echo "Artefactos en: $RELEASE"
|
||||
ls -la "$RELEASE"
|
||||
exec bash "$ROOT/build-all.sh" "$@"
|
||||
|
||||
Reference in New Issue
Block a user