update
This commit is contained in:
68
AzA march 2026/_release_pre_backup_1_3_13.py
Normal file
68
AzA march 2026/_release_pre_backup_1_3_13.py
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Einmaliges PRE-Release-Backup 1.3.13."""
|
||||
from __future__ import annotations
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
TS = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
BACKUP = ROOT / f"backup_pre_release_1_3_13_{TS}"
|
||||
BACKUP.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
FILES = [
|
||||
"aza_version.py",
|
||||
"version.json",
|
||||
"release/version.json",
|
||||
"_build_info.py",
|
||||
"web/empfang.html",
|
||||
"aza_empfang_webview.py",
|
||||
"aza_empfang_shell_surface.py",
|
||||
"basis14.py",
|
||||
"build_exe.ps1",
|
||||
"build_installer.ps1",
|
||||
"release.ps1",
|
||||
"sign_release_artifacts.ps1",
|
||||
"build_release_manifest.ps1",
|
||||
"publish_update.ps1",
|
||||
"start_doku_prompt_test.ps1",
|
||||
"aza_build_stamp.py",
|
||||
"installer/aza_installer.iss",
|
||||
]
|
||||
|
||||
for rel in FILES:
|
||||
src = ROOT / rel
|
||||
if src.is_file():
|
||||
dst = BACKUP / rel
|
||||
dst.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(src, dst)
|
||||
|
||||
for name, cmd in [
|
||||
("git_status_before.txt", ["git", "status", "--short"]),
|
||||
("git_diff_stat_before.txt", ["git", "diff", "--stat"]),
|
||||
("git_diff_before.patch", ["git", "diff"]),
|
||||
]:
|
||||
try:
|
||||
r = subprocess.run(cmd, cwd=ROOT, capture_output=True, text=True, check=False)
|
||||
(BACKUP / name).write_text(r.stdout + r.stderr, encoding="utf-8")
|
||||
except Exception as exc:
|
||||
(BACKUP / name).write_text(f"ERROR: {exc}", encoding="utf-8")
|
||||
|
||||
v13 = ROOT / "dist" / "test_final_release_candidate_v13"
|
||||
v13_dst = BACKUP / "dist" / "test_final_release_candidate_v13"
|
||||
if v13.is_dir():
|
||||
shutil.copytree(v13, v13_dst, dirs_exist_ok=True)
|
||||
|
||||
readme = f"""WIEDERHERSTELLUNG backup_pre_release_1_3_13
|
||||
Erstellt: {TS}
|
||||
Projektroot: {ROOT}
|
||||
|
||||
1. Dateien aus diesem Backup ins Projektroot zurueckkopieren
|
||||
2. dist/test_final_release_candidate_v13/ zurueckkopieren
|
||||
3. Git-Stand: git_status_before.txt, git_diff_before.patch
|
||||
4. Server-Manifest/Installer bei Bedarf aus Server-PRE-Backup wiederherstellen (1.3.12)
|
||||
"""
|
||||
(BACKUP / "README_RESTORE.txt").write_text(readme, encoding="utf-8")
|
||||
print(f"PRE_BACKUP_DIR={BACKUP}")
|
||||
Reference in New Issue
Block a user