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

Rename template info key names in cookiecutter context #1348

Merged
merged 1 commit into from
Jul 8, 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/1347.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An error no longer occurs when creating a new Briefcase project while ``cookiecutter>=2.2.0`` is installed.
4 changes: 2 additions & 2 deletions src/briefcase/commands/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ def new_app(
# include the version of Briefcase as well as the source of the template.
context.update(
{
"template": template,
"branch": branch,
"template_source": template,
"template_branch": branch,
"briefcase_version": briefcase.__version__,
}
)
Expand Down
32 changes: 16 additions & 16 deletions tests/commands/new/test_new_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def test_new_app(
# The expected app context
# should now also contain the
# default template and branch
"template": "https://github.com/beeware/briefcase-template",
"branch": expected_branch,
"template_source": "https://github.com/beeware/briefcase-template",
"template_branch": expected_branch,
"briefcase_version": briefcase_version,
},
)
Expand Down Expand Up @@ -129,8 +129,8 @@ def test_new_app_missing_template(monkeypatch, new_command, tmp_path):
# The expected app context
# should now also contain the
# default template and branch
"template": "https://github.com/beeware/briefcase-template",
"branch": "v37.42.7",
"template_source": "https://github.com/beeware/briefcase-template",
"template_branch": "v37.42.7",
"briefcase_version": "37.42.7",
},
)
Expand Down Expand Up @@ -196,8 +196,8 @@ def test_new_app_dev(monkeypatch, new_command, tmp_path, briefcase_version):
# The expected app context
# should now also contain the
# default template and branch
"template": "https://github.com/beeware/briefcase-template",
"branch": "v37.42.7",
"template_source": "https://github.com/beeware/briefcase-template",
"template_branch": "v37.42.7",
"briefcase_version": briefcase_version,
},
),
Expand All @@ -213,8 +213,8 @@ def test_new_app_dev(monkeypatch, new_command, tmp_path, briefcase_version):
# The expected app context
# should now also contain the
# default template and branch
"template": "https://github.com/beeware/briefcase-template",
"branch": "v37.42.7",
"template_source": "https://github.com/beeware/briefcase-template",
"template_branch": "v37.42.7",
"briefcase_version": briefcase_version,
},
),
Expand Down Expand Up @@ -261,8 +261,8 @@ def test_new_app_with_template(monkeypatch, new_command, tmp_path):
# The expected app context
# should now also contain the
# template and branch
"template": "https://example.com/other.git",
"branch": "v37.42.7",
"template_source": "https://example.com/other.git",
"template_branch": "v37.42.7",
"briefcase_version": "37.42.7",
},
)
Expand Down Expand Up @@ -313,8 +313,8 @@ def test_new_app_with_invalid_template(monkeypatch, new_command, tmp_path):
# The expected app context
# should now also contain the
# template and branch
"template": "https://example.com/other.git",
"branch": "v37.42.7",
"template_source": "https://example.com/other.git",
"template_branch": "v37.42.7",
"briefcase_version": "37.42.7",
},
)
Expand Down Expand Up @@ -368,8 +368,8 @@ def test_new_app_with_invalid_template_branch(monkeypatch, new_command, tmp_path
# The expected app context
# should now also contain the
# template and branch
"template": "https://example.com/other.git",
"branch": "v37.42.7",
"template_source": "https://example.com/other.git",
"template_branch": "v37.42.7",
"briefcase_version": "37.42.7",
},
)
Expand Down Expand Up @@ -414,8 +414,8 @@ def test_new_app_with_branch(monkeypatch, new_command, tmp_path):
# The expected app context
# should now also contain the
# template and branch
"template": "https://github.com/beeware/briefcase-template",
"branch": "experimental",
"template_source": "https://github.com/beeware/briefcase-template",
"template_branch": "experimental",
"briefcase_version": "37.42.7",
},
)
Expand Down
Loading