Skip to content

feat: add release notifications and interactive updates - #468

Draft
nieomylnieja wants to merge 24 commits into
mainfrom
add-new-feature-and-new-version-notifications
Draft

feat: add release notifications and interactive updates#468
nieomylnieja wants to merge 24 commits into
mainfrom
add-new-feature-and-new-version-notifications

Conversation

@nieomylnieja

@nieomylnieja nieomylnieja commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Currently, sloctl users have no automated way to learn that a new CLI version is available. Release notifications should help during interactive use without affecting CI, non-interactive commands, or development builds.

Summary

Added cached release notifications with release highlights and an opt-out environment variable for eligible interactive sessions.

Limited interactive update actions to runnable Homebrew and Go installations. Other installation methods now show the README installation link and continue the requested command without prompting.

Kept native Windows notifications non-interactive while allowing the update form in supported MinGW and Cygwin terminals.

Kept the GitHub release endpoint fixed in ordinary binaries and configurable at build time for deterministic test binaries, and rendered notifications with the shared sloctl terminal theme.

Testing

  • Added fixture-backed Bats coverage for update and skip behavior, unavailable package managers, cache failures, future cache timestamps, and requested-command continuation.
  • Added Go coverage for GOBIN, the first GOPATH entry, file-identity matching, and Windows form-support decisions.
  • Kept native platform coverage for notification and updater behavior on Linux, macOS, and Windows.

Release Notes

Added release notifications for eligible interactive sloctl sessions. Homebrew and Go installations can run their matching updater; other installations show the README installation link and continue without prompting.

Show a cached TTY notification after successful commands when a newer sloctl release includes feature updates.
Add coverage for notifier behavior and CLI execution flow, including end-to-end notification tests.
nieomylnieja and others added 22 commits May 26, 2026 13:49
Detect how sloctl was installed so notifications can suggest the right upgrade
command for Homebrew, `go install`, or the install script fallback.
Show notifications for releases without feature entries and include bug-fix sections when extracting release notes.
Refresh the plain-text styling and wrap long install commands to fit narrower terminals.
Run update notifications before command execution and let users upgrade, skip,
or defer until the next version. Replace the GitHub proxy tests with
deterministic TTY fixtures and a local release fixture server.
Detect MinGW and Cygwin before showing the interactive update form.
Fall back to notification-only behavior for unsupported Windows shells.
Recognize Cygwin and MinGW terminals while suppressing the update form in
native Windows consoles. Add platform Bats coverage for Linux, macOS
Homebrew installs, and Windows.
Use semantic version ordering, preserve prompt interruption, and execute
detected updater commands safely. Expand release-note and CLI regression
coverage, and align test documentation and CI configuration.
@nieomylnieja nieomylnieja changed the title feat: add release feature notifications feat: add release notifications and interactive updates Jul 27, 2026
Detect Homebrew and Go installations reliably, persist skip preferences safely, and add installation guidance for unsupported setups. Extend notification tests and PTY helpers for update flows and timeout handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants