Replace rollback with manual version selection and simplify updater
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user