mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Reorder command options
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com>
|
||||
# Copyright 2014-present Ivan Kravets <me@ikravets.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -53,9 +53,9 @@ def validate_path(ctx, param, value): # pylint: disable=W0613
|
||||
|
||||
@click.command("ci", short_help="Continuous Integration")
|
||||
@click.argument("src", nargs=-1, callback=validate_path)
|
||||
@click.option("--lib", "-l", multiple=True, callback=validate_path)
|
||||
@click.option("-l", "--lib", multiple=True, callback=validate_path)
|
||||
@click.option("--exclude", multiple=True)
|
||||
@click.option("--board", "-b", multiple=True, metavar="ID",
|
||||
@click.option("-b", "--board", multiple=True, metavar="ID",
|
||||
callback=validate_boards)
|
||||
@click.option("--build-dir", default=mkdtemp,
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
@ -64,7 +64,7 @@ def validate_path(ctx, param, value): # pylint: disable=W0613
|
||||
@click.option("--project-conf",
|
||||
type=click.Path(exists=True, file_okay=True, dir_okay=False,
|
||||
readable=True, resolve_path=True))
|
||||
@click.option("--verbose", "-v", is_flag=True)
|
||||
@click.option("-v", "--verbose", is_flag=True)
|
||||
@click.pass_context
|
||||
def cli(ctx, src, lib, exclude, board, # pylint: disable=R0913
|
||||
build_dir, keep_build_dir, project_conf, verbose):
|
||||
|
@ -46,7 +46,7 @@ def validate_boards(ctx, param, value): # pylint: disable=W0613
|
||||
@click.option("--project-dir", "-d", default=getcwd,
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
writable=True, resolve_path=True))
|
||||
@click.option("--board", "-b", multiple=True, metavar="ID",
|
||||
@click.option("-b", "--board", multiple=True, metavar="ID",
|
||||
callback=validate_boards)
|
||||
@click.option("--ide",
|
||||
type=click.Choice(ProjectGenerator.get_supported_ides()))
|
||||
|
@ -72,8 +72,8 @@ def platform_search(query, json_output):
|
||||
|
||||
@cli.command("install", short_help="Install new platforms")
|
||||
@click.argument("platforms", nargs=-1, required=True)
|
||||
@click.option("--with-package", multiple=True, metavar="<package>")
|
||||
@click.option("--without-package", multiple=True, metavar="<package>")
|
||||
@click.option("--with-package", multiple=True)
|
||||
@click.option("--without-package", multiple=True)
|
||||
@click.option("--skip-default-package", is_flag=True)
|
||||
def platform_install(platforms, with_package, without_package,
|
||||
skip_default_package):
|
||||
|
@ -30,13 +30,13 @@ from platformio.managers.platform import PlatformFactory
|
||||
|
||||
|
||||
@click.command("run", short_help="Process project environments")
|
||||
@click.option("--environment", "-e", multiple=True, metavar="<environment>")
|
||||
@click.option("--target", "-t", multiple=True, metavar="<target>")
|
||||
@click.option("--upload-port", metavar="<upload port>")
|
||||
@click.option("--project-dir", "-d", default=getcwd,
|
||||
@click.option("-e", "--environment", multiple=True)
|
||||
@click.option("-t", "--target", multiple=True)
|
||||
@click.option("--upload-port")
|
||||
@click.option("-d", "--project-dir", default=getcwd,
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
writable=True, resolve_path=True))
|
||||
@click.option("--verbose", "-v", is_flag=True)
|
||||
@click.option("-v", "--verbose", is_flag=True)
|
||||
@click.option("--disable-auto-clean", is_flag=True)
|
||||
@click.pass_context
|
||||
def cli(ctx, environment, target, upload_port, # pylint: disable=R0913,R0914
|
||||
|
@ -32,7 +32,7 @@ from platformio.managers.platform import PlatformFactory
|
||||
@click.option("--environment", "-e", multiple=True, metavar="<environment>")
|
||||
@click.option("--skip", multiple=True, metavar="<pattern>")
|
||||
@click.option("--upload-port", metavar="<upload port>")
|
||||
@click.option("--project-dir", "-d", default=getcwd,
|
||||
@click.option("-d", "--project-dir", default=getcwd,
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
writable=True, resolve_path=True))
|
||||
@click.option("--verbose", "-v", is_flag=True)
|
||||
|
Reference in New Issue
Block a user