35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Genera ambos artefactos: Linux (local/Docker) y Windows (PowerShell + Python en Windows).
|
|
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"
|