Replace rollback with manual version selection and simplify updater

This commit is contained in:
Aaron
2025-12-14 18:20:11 -05:00
parent 831a98c5a1
commit b01bfcd38e
7 changed files with 257 additions and 203 deletions

View File

@@ -14,7 +14,7 @@ import argparse
import sys
from pikit_api import HOST, PORT
from pikit_api.releases import apply_update, check_for_update, rollback_update
from pikit_api.releases import apply_update, check_for_update
from pikit_api.server import run_server
@@ -22,7 +22,6 @@ def parse_args():
parser = argparse.ArgumentParser(description="Pi-Kit API / updater")
parser.add_argument("--apply-update", action="store_true", help="Apply latest release (non-HTTP mode)")
parser.add_argument("--check-update", action="store_true", help="Check for latest release (non-HTTP mode)")
parser.add_argument("--rollback-update", action="store_true", help="Rollback to last backup (non-HTTP mode)")
parser.add_argument("--host", default=HOST, help="Bind host (default 127.0.0.1)")
parser.add_argument("--port", type=int, default=PORT, help="Bind port (default 4000)")
return parser.parse_args()
@@ -36,9 +35,6 @@ def main():
if args.check_update:
check_for_update()
return
if args.rollback_update:
rollback_update()
return
run_server(host=args.host, port=args.port)