Skip to content

Commit 07c3a4c

Browse files
committed
Use without_runtime_setup for plain changelog and upgrade commands, remove plain-changelog and plain-upgrade
1 parent 99301ea commit 07c3a4c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

plain/plain/cli/changelog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import click
88

99
from .output import style_markdown
10+
from .runtime import without_runtime_setup
1011

1112

1213
def parse_version(version_str: str) -> tuple[int, ...]:
@@ -42,6 +43,7 @@ def compare_versions(v1: str, v2: str) -> int:
4243
return 0
4344

4445

46+
@without_runtime_setup
4547
@click.command("changelog")
4648
@click.argument("package_label")
4749
@click.option("--from", "from_version", help="Show entries from this version onwards")

plain/plain/cli/upgrade.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
import click
77

88
from .agent.prompt import prompt_agent
9+
from .runtime import without_runtime_setup
910

1011
LOCK_FILE = Path("uv.lock")
1112

1213

14+
@without_runtime_setup
1315
@click.command()
1416
@click.argument("packages", nargs=-1)
1517
@click.option(
@@ -144,7 +146,7 @@ def build_prompt(before_after: dict[str, tuple[str | None, str | None]]) -> str:
144146
"## Instructions",
145147
"",
146148
"1. **Process each package systematically:**",
147-
" - For each package, run: `uv run plain-changelog {package} --from {before} --to {after}`",
149+
" - For each package, run: `uv run plain changelog {package} --from {before} --to {after}`",
148150
" - Read the 'Upgrade instructions' section carefully",
149151
" - If it says 'No changes required', skip to the next package",
150152
" - Apply any required code changes as specified",

plain/pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ requires-python = ">=3.13"
1616
[project.scripts]
1717
plain = "plain.cli.core:cli"
1818

19-
# Make this directly available without loading Plain,
20-
# for use in upgrade scripts.
21-
plain-changelog = "plain.cli.changelog:changelog"
22-
plain-upgrade = "plain.cli.upgrade:upgrade"
23-
2419
[dependency-groups]
2520
dev = [
2621
"pytest>=8.0.0",

0 commit comments

Comments
 (0)