push.py 970 B

1234567891011121314151617181920212223242526272829
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. import argparse
  10. from materialize.cli.scratch import check_required_vars
  11. from materialize.scratch import get_instance, mkrepo
  12. def configure_parser(parser: argparse.ArgumentParser) -> None:
  13. check_required_vars()
  14. parser.add_argument(
  15. "instance",
  16. help="The ID of the instance to connect to, or 'mine' to specify your only live instance",
  17. )
  18. parser.add_argument("--rev", help="The git rev to checkout", default="HEAD")
  19. def run(args: argparse.Namespace) -> None:
  20. instance = get_instance(args.instance)
  21. mkrepo(instance, args.rev, init=False, force=True)