فهرست منبع

Merge pull request #1791 from ChristianLempa/release/0.2.1

release: prepare v0.2.1
Christian Lempa 4 هفته پیش
والد
کامیت
154412831e
5فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
  1. 7 1
      CHANGELOG.md
  2. 3 0
      RELEASE.md
  3. 2 4
      cli/__main__.py
  4. 1 4
      cli/core/module/helpers.py
  5. 1 0
      pyproject.toml

+ 7 - 1
CHANGELOG.md

@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+## [0.2.1] - 2026-05-04
+
 ### Added
 - Bash template kind for Bash-oriented scripts, bootstrap flows, maintenance tasks, and automation snippets (#1772)
 - Python template kind for Python-oriented project scaffolds, automation helpers, packages, and service/tooling skeletons (#1773)
@@ -23,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Fixed
 - Ansible templates can now contain literal downstream Jinja expressions like `{{ variable }}` without boilerplate validation treating them as undeclared variables (#1775)
+- Pipx installs now include the required `click` dependency and CLI startup no longer fails with missing or inactive click contexts (#1795, #1797, #1796)
 
 ## [0.2.0-2] - 2026-04-23
 
@@ -144,7 +147,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 Initial public release with core CLI functionality.
 
-[unreleased]: https://github.com/christianlempa/boilerplates/compare/v0.1.2...HEAD
+[unreleased]: https://github.com/christianlempa/boilerplates/compare/v0.2.1...HEAD
+[0.2.1]: https://github.com/christianlempa/boilerplates/compare/v0.2.0-2...v0.2.1
+[0.2.0-2]: https://github.com/christianlempa/boilerplates/compare/v0.2.0-1...v0.2.0-2
+[0.2.0-1]: https://github.com/christianlempa/boilerplates/compare/v0.1.2...v0.2.0-1
 [0.1.2]: https://github.com/christianlempa/boilerplates/compare/v0.1.1...v0.1.2
 [0.1.1]: https://github.com/christianlempa/boilerplates/compare/v0.1.0...v0.1.1
 [0.1.0]: https://github.com/christianlempa/boilerplates/compare/v0.0.7...v0.1.0

+ 3 - 0
RELEASE.md

@@ -83,6 +83,9 @@ The release workflow validates this and fails if they differ.
    release: prepare vx.x.x
    ```
 
+   GitHub Actions automatically runs the configured PR checks for pull requests targeting `main`.
+   Monitor the PR until those checks complete successfully.
+
 7. Merge the release PR after checks and review pass.
 
 ## Publish the release

+ 2 - 4
cli/__main__.py

@@ -14,7 +14,7 @@ from pathlib import Path
 
 import click
 from rich.console import Console
-from typer import Option, Typer
+from typer import Context, Option, Typer
 from typer.core import TyperGroup
 
 import cli.modules
@@ -79,6 +79,7 @@ def setup_logging(log_level: str = "WARNING") -> None:
 
 @app.callback(invoke_without_command=True)
 def main(
+    ctx: Context,
     _version: bool | None = Option(
         None,
         "--version",
@@ -104,9 +105,6 @@ def main(
         # Silence all logging (including third-party) unless user explicitly requests it
         logging.disable(logging.CRITICAL)
 
-    # Get context without type annotation (compatible with all Typer versions)
-    ctx = click.get_current_context()
-
     # Store log level in context for potential use by other commands
     ctx.ensure_object(dict)
     ctx.obj["log_level"] = log_level

+ 1 - 4
cli/core/module/helpers.py

@@ -194,10 +194,7 @@ def apply_cli_overrides(template, var: list[str] | None, ctx=None) -> None:
 
     # Get context if not provided (compatible with all Typer versions)
     if ctx is None:
-        try:
-            ctx = click.get_current_context()
-        except RuntimeError:
-            ctx = None
+        ctx = click.get_current_context(silent=True)
 
     extra_args = list(ctx.args) if ctx and hasattr(ctx, "args") else []
     cli_overrides = parse_var_inputs(var or [], extra_args)

+ 1 - 0
pyproject.toml

@@ -23,6 +23,7 @@ dependencies = [
     "python-frontmatter>=1.0.0",
     "Jinja2>=3.0",
     "email-validator>=2.0.0",
+    "click==8.1.4",
 ]
 
 [project.optional-dependencies]