-
Notifications
You must be signed in to change notification settings - Fork 8k
feat(cli): warn when a newer spec-kit release is available (#1320) #2212
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
1ffcbf9
81a7418
e45a36a
b75e55f
d8c16f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -327,6 +327,10 @@ def callback(ctx: typer.Context): | |||||
| show_banner() | ||||||
| console.print(Align.center("[dim]Run 'specify --help' for usage information[/dim]")) | ||||||
| console.print() | ||||||
| # Addresses #1320: nudge users running outdated CLIs. The `version` subcommand | ||||||
| # already surfaces the version, so skip there to avoid double-printing. | ||||||
| if ctx.invoked_subcommand not in (None, "version"): | ||||||
| _check_for_updates() | ||||||
|
mnriem marked this conversation as resolved.
|
||||||
|
|
||||||
| def run_command(cmd: list[str], check_return: bool = True, capture: bool = False, shell: bool = False) -> Optional[str]: | ||||||
| """Run a shell command and optionally capture output.""" | ||||||
|
|
@@ -1586,6 +1590,143 @@ def get_speckit_version() -> str: | |||||
| return "unknown" | ||||||
|
|
||||||
|
|
||||||
| # ===== Update check (addresses #1320) ===== | ||||||
| # | ||||||
| # Cached once per 24h in the platform user-cache dir. Triggered from the top-level | ||||||
| # callback. Never blocks the user — every failure path swallows the exception. | ||||||
|
mnriem marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| _UPDATE_CHECK_URL = "https://api.github.com/repos/github/spec-kit/releases/latest" | ||||||
|
||||||
| _UPDATE_CHECK_URL = "https://api.github.com/repos/github/spec-kit/releases/latest" | |
| _UPDATE_CHECK_URL = GITHUB_API_LATEST |
Uh oh!
There was an error while loading. Please reload this page.