mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-14 20:03:01 +02:00
Adds a "safety net" rollback so a server can be downgraded to an earlier release without a manual redeploy, mirroring the existing update flow. - GitHubReleases: getVersionFile() fetches a specific version's asset (not just latest); getPreviousVersions() lists the newest releases older than a given version, each flagged beta (GitHub prerelease). getReleases() now delegates to a shared getFilteredReleases() that keeps the prerelease flag. - UpdateCommand: new `rollback <version>` case — validates the target is a real, strictly-older release; on MAIN takes an automatic DB backup first (aborting if it fails); downloads the exact version (main/lb_update asset), verifies MD5, and hands off to the same python `update` applier. - RootSignalsCronJob: dispatch the `rollback` signal to `console.php update rollback <version>` (version regex-validated, escapeshellarg'd). - api.php: `rollback_versions` (channel-aware list, optional per-server base version) and server `sub=rollback` (validates version, writes the signal). - servers.php: per-server "Rollback Version" action (dropdown item + button) opening a modal to pick a version; beta builds show "(beta)". Works for MAIN and each LB independently. - docs: rollback sections in server-update.md and update-system.md. The downgrade reuses the version-agnostic python applier, so binaries, config and user data are preserved. Migrations are forward-only and are not rolled back; the automatic MAIN backup is the recovery path.