Skip to content
Snippets Groups Projects
Commit 37ed408e authored by Filippo Cremonese's avatar Filippo Cremonese
Browse files

Improved command line interface, adding short options

parent 1a547097
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,9 @@ from orchestra.model.configuration import Configuration
parser = argparse.ArgumentParser()
# TODO: set default loglevel to INFO or WARNING
parser.add_argument("--loglevel", "-v", default="DEBUG", choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"])
parser.add_argument("--quiet", action="store_true", help="Do not show output of executed commands")
parser.add_argument("--quiet", "-q", action="store_true", help="Do not show output of executed commands")
parser.add_argument("--no-config-cache", action="store_true", help="Do not cache generated yaml configuration")
parser.add_argument("--no-binary-archives", action="store_true", help="Build all components from source")
parser.add_argument("--from-source", "-B", action="store_true", help="Build all components from source")
subparsers = install_subcommands(parser)
......
......@@ -19,7 +19,7 @@ class Configuration:
def __init__(self, args):
self.args = args
self.components: Dict[str, comp.Component] = {}
self.no_binary_archives = args.no_binary_archives
self.from_source = args.from_source
self.orchestra_dotdir = self._locate_orchestra_dotdir()
if not self.orchestra_dotdir:
......@@ -148,7 +148,7 @@ class Configuration:
configure_script = build_yaml["configure"]
build.configure = ConfigureAction(build, configure_script, self)
from_source = component_yaml.get("build_from_source", False) or self.no_binary_archives
from_source = component_yaml.get("build_from_source", False) or self.from_source
install_script = build_yaml["install"]
build.install = InstallAction(build, install_script, self, from_binary_archives=not from_source)
......@@ -185,7 +185,7 @@ class Configuration:
build.configure.external_dependencies.add(dep_action)
if not component_yaml.get("build_from_source") \
and not self.no_binary_archives \
and not self.from_source \
and not build_only:
build.install.external_dependencies.add(dep_action)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment