Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying overrides in the command line for new projects #1552

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1552.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When creating new projects with the ``briefcase new`` command, project configuration overrides can be specified via the ``-Q`` command line argument. For instance, a specific license can be specified with ``-Q "license=MIT license"``.
15 changes: 15 additions & 0 deletions docs/reference/commands/new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,18 @@ version of Briefcase that is being used (i.e., if you're using Briefcase 0.3.14,
Briefcase will use the ``v0.3.14`` template branch when generating the app). If
you're using a development version of Briefcase, Briefcase will use the ``main``
branch of the template.

``-Q <KEY=VALUE>``
------------------

Override the answer to a new project prompt with the provided value.

For instance, if ``-Q "license=MIT license`` is specified, then the question to
choose a license will not be presented to the user and the MIT license will be
automatically used for the project. When used in conjunction with ``--no-input``,
the provided value overrides the default answer.

The expected keys are specified by the cookiecutter template being used to
create the new project. Therefore, the set of possible keys is not listed here
but should be expected to remain consistent for any specific version of
Briefcase; with version changes, though, the keys may change.
2 changes: 1 addition & 1 deletion src/briefcase/commands/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def add_options(self, parser):
dest="run_app",
action="store_false",
default=True,
help="Do not run the app, just install requirements.",
help="Do not run the app, just install requirements",
)
parser.add_argument(
"--test",
Expand Down
Loading