Skip to content

Rework the new version notice - #70

Merged
weppos merged 2 commits into
mainfrom
version-notification-ux-bf75df
Aug 24, 2026
Merged

Rework the new version notice#70
weppos merged 2 commits into
mainfrom
version-notification-ux-bf75df

Conversation

@weppos

@weppos weppos commented Aug 24, 2026

Copy link
Copy Markdown
Member

The new release notice now prints a coloured headline with the version transition, the upgrade command for the detected install method, and the release page URL, with a blank line above and below. The URL prints for every install method, which replaces the Visit .../latest to upgrade. line that only appeared when the install method was unknown.

--no-color and the NO_COLOR environment variable turn the colour off. This is the first code that reads the --no-color flag; the NoColor field on output.Printer stays unused.

DefaultReleaseURL now names dnsimple/cli. #69 removed the dnsimple/homebrew-tap release mirror that the constant pointed at, so both the latest version lookup and the release page URL named a repository that no longer holds the artifacts.

🔍 QA

Scenario: the notice appears

  • Build a binary with a version older than the latest release: go build -ldflags "-X main.version=0.1.0" -o /tmp/dnsimple ./cmd/dnsimple.
  • Delete the cached state at state.json in the config directory, then run /tmp/dnsimple accounts list in a terminal.
  • Confirm the block appears after the command output, with a blank line above it and below it. The headline is yellow, both version numbers are cyan, and the release URL is yellow.
  • Confirm the release URL names dnsimple/cli and opens the release page for the new version.

Scenario: the upgrade command matches the installation

  • Run the same binary from a Homebrew path, from ~/.dnsimple/bin, and from ~/go/bin.
  • Confirm each run names the upgrade command for that installation method.
  • Confirm a binary in an unrecognised path prints the headline and the URL, and omits the To upgrade, run: line.

Scenario: the notice is suppressed

  • Run with --no-color, and again with NO_COLOR=1. Confirm the block appears with no colour.
  • Run with DNSIMPLE_NO_UPDATE_CHECK=1. Confirm no block appears.
  • Redirect the standard error stream to a file. Confirm no block appears.

📋 Deployment Pre/Post tasks

N/A

:shipit: Deployment Verification

N/A

weppos added 2 commits August 24, 2026 11:51
Adopt the block shape that gh and depot use: a coloured headline with the
version transition, the upgrade command for the detected install method,
and the release page URL, with a blank line above and below.

The release URL now prints for every install method, so the "Visit
.../latest to upgrade." fallback is gone. --no-color and the NO_COLOR
environment variable turn the colour off; this is the first code that
reads the --no-color flag.
Point the version check at dnsimple/cli. The homebrew-tap release mirror
that DefaultReleaseURL named is removed on main, so both the latest
version lookup and the release page URL in the notice pointed at a
repository that no longer holds the artifacts.
@weppos weppos self-assigned this Aug 24, 2026
@weppos weppos added the enhancement New feature, enhancement or code changes, not related to defects label Aug 24, 2026
@weppos
weppos merged commit 767c34b into main Aug 24, 2026
8 checks passed
@weppos
weppos deleted the version-notification-ux-bf75df branch August 24, 2026 09:59
@weppos weppos mentioned this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, enhancement or code changes, not related to defects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant