feature/integracion-cpanel-asrecovery
This commit is contained in:
27
packaging/scripts/package-release.sh
Normal file
27
packaging/scripts/package-release.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Empaqueta artefactos en dist/release/
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
RELEASE="$ROOT/dist/release"
|
||||
mkdir -p "$RELEASE"
|
||||
|
||||
[[ -f "$ROOT/dist/CloudRestoreAS.exe" ]] && cp -f "$ROOT/dist/CloudRestoreAS.exe" "$RELEASE/"
|
||||
[[ -f "$ROOT/dist/CloudRestoreAS" ]] && cp -f "$ROOT/dist/CloudRestoreAS" "$RELEASE/CloudRestoreAS-linux" && chmod +x "$RELEASE/CloudRestoreAS-linux"
|
||||
cp -f "$ROOT/packaging/LEEME.txt" "$RELEASE/"
|
||||
|
||||
python3 <<'PY'
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
release = Path("dist/release")
|
||||
if (release / "CloudRestoreAS.exe").exists():
|
||||
with zipfile.ZipFile(release / "CloudRestoreAS-win.zip", "w", zipfile.ZIP_DEFLATED) as z:
|
||||
z.write(release / "CloudRestoreAS.exe", "CloudRestoreAS.exe")
|
||||
z.write(release / "LEEME.txt", "LEEME.txt")
|
||||
PY
|
||||
|
||||
if [[ -f "$RELEASE/CloudRestoreAS-linux" ]]; then
|
||||
tar czf "$RELEASE/CloudRestoreAS-linux.tar.gz" -C "$RELEASE" CloudRestoreAS-linux LEEME.txt
|
||||
fi
|
||||
|
||||
echo "Release en: $RELEASE"
|
||||
ls -lh "$RELEASE"
|
||||
Reference in New Issue
Block a user