feat(updater): stage3 resilient gui update flow
Some checks failed
Desktop Dev Pre-release / prerelease (push) Failing after 2m18s

- added retry-based file copy, rollback restart, and version marker validation in updater GUI

- added build step to write dist/version.txt for post-update validation

- added unit tests for updater helpers
This commit is contained in:
2026-02-15 21:46:36 +03:00
parent a6cee33cf6
commit 8d4bc10cb7
3 changed files with 132 additions and 23 deletions

View File

@@ -24,6 +24,18 @@ REMOVE_LIST = [
]
def write_version_marker():
marker_path = os.path.join(DIST_DIR, "version.txt")
try:
os.makedirs(DIST_DIR, exist_ok=True)
with open(marker_path, "w", encoding="utf-8") as f:
f.write(str(VERSION).strip() + "\n")
print(f"[OK] Обновлен маркер версии: {marker_path}")
except Exception as e:
print(f"[ERROR] Не удалось записать version.txt: {e}")
sys.exit(1)
def ensure_project_root():
missing = [name for name in SAFE_CLEAN_ROOT_FILES if not os.path.exists(name)]
if missing:
@@ -126,6 +138,7 @@ if __name__ == "__main__":
run_build()
run_updater_build()
run_cleanup()
write_version_marker()
create_archive()
print("\n" + "=" * 30)