Skip to content

Commit 211019e

Browse files
committed
feat(init): deprecate --no-git flag, gate deprecations at v0.10.0
- Add deprecation warning when --no-git is used on specify init - Update --ai deprecation gate from 1.0.0 to 0.10.0 - Update test expectation for the new version gate Closes #2167
1 parent 9f14dfc commit 211019e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _build_ai_deprecation_warning(
127127
ai_commands_dir=ai_commands_dir,
128128
)
129129
return (
130-
"[bold]--ai[/bold] is deprecated and will no longer be available in version 1.0.0 or later.\n\n"
130+
"[bold]--ai[/bold] is deprecated and will no longer be available in version 0.10.0 or later.\n\n"
131131
f"Use [bold]{replacement}[/bold] instead."
132132
)
133133

@@ -1088,6 +1088,13 @@ def init(
10881088
'use [bold]--integration generic --integration-options="--commands-dir <dir>"[/bold] instead.[/dim]'
10891089
)
10901090

1091+
if no_git:
1092+
console.print(
1093+
"[yellow]⚠️ --no-git is deprecated and will be removed in v0.10.0.[/yellow]\n"
1094+
"[yellow]The git extension will no longer be enabled by default "
1095+
"— use --extension git to opt in.[/yellow]"
1096+
)
1097+
10911098
if project_name == ".":
10921099
here = True
10931100
project_name = None # Clear project_name to use existing validation logic

tests/integrations/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_ai_emits_deprecation_warning_with_integration_replacement(self, tmp_pat
112112
assert "--ai" in normalized_output
113113
assert "deprecated" in normalized_output
114114
assert "no longer be available" in normalized_output
115-
assert "1.0.0" in normalized_output
115+
assert "0.10.0" in normalized_output
116116
assert "--integration copilot" in normalized_output
117117
assert normalized_output.index("Deprecation Warning") < normalized_output.index("Next Steps")
118118
assert (project / ".github" / "agents" / "speckit.plan.agent.md").exists()

0 commit comments

Comments
 (0)