Skip to content

Commit

Permalink
Treat dev0 versions of Briefcase as development versions (fixes bee…
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Oct 16, 2022
1 parent f0e822f commit a9a8bfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changes/926.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Briefcase versions containing ``dev0`` are now considered development versions for fetching templates.
4 changes: 2 additions & 2 deletions src/briefcase/commands/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def generate_app_template(self, app: BaseConfig):
)
except TemplateUnsupportedVersion:
# If we're on a development branch, and the template branch was *not*
# provided explicity, we can use a fallback development template.
# provided explicitly, we can use a fallback development template.
# Otherwise, re-raise the exception about the unsupported template version.
if version.dev and app.template_branch is None:
if version.dev is not None and app.template_branch is None:
# Development branches can use the main template.
self.logger.info(
f"Template branch {template_branch} not found; falling back to development template"
Expand Down
2 changes: 1 addition & 1 deletion src/briefcase/commands/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def new_app(self, template: Optional[str] = None, **options):
except TemplateUnsupportedVersion:
# If we're *not* on a development branch, raise an error about
# the missing template branch.
if not version.dev:
if version.dev is None:
raise

# Development branches can use the main template.
Expand Down

0 comments on commit a9a8bfa

Please sign in to comment.