Skip to content

Add waza update command#288

Merged
github-actions[bot] merged 5 commits into
mainfrom
spboyer/update-command
May 23, 2026
Merged

Add waza update command#288
github-actions[bot] merged 5 commits into
mainfrom
spboyer/update-command

Conversation

@spboyer

@spboyer spboyer commented May 23, 2026

Copy link
Copy Markdown
Member

Waza already checks for newer releases, but users had to copy and run the raw installer command themselves. This adds a first-class waza update path so the update notice can point to a safer, discoverable command.

Summary

  • Add waza update with an explicit confirmation prompt before running the official installer.
  • Target installers by OS: Bash for macOS/Linux and PowerShell for native Windows.
  • Add install.ps1 for native Windows, including checksum verification and delayed replacement to avoid Windows locking the running waza.exe.
  • Add --yes/-y for scripted updates and clear guidance when the required installer shell is unavailable.
  • Skip the automatic update notice while the update command itself is running.
  • Change update notices to recommend waza update and document OS-specific install/update behavior in README and the docs site.

Testing

  • go test ./cmd/waza ./internal/version
  • go test ./...
  • cd site && npm ci --no-audit --no-fund && npm run build
  • PowerShell parser check for install.ps1 when pwsh is available

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 14:31
@github-actions github-actions Bot enabled auto-merge (squash) May 23, 2026 14:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-class waza update command so upgrade notices can point users to a safer, discoverable update flow instead of a copy/paste installer one-liner.

Changes:

  • Introduces waza update with a confirmation prompt plus --yes/-y for non-interactive updates, and provides guidance when Bash isn’t available.
  • Skips the background update check while waza update itself is running, and updates version notices to recommend waza update.
  • Updates docs/CLI reference and adds unit tests covering the new command and updated notice text.
Show a summary per file
File Description
site/src/content/docs/reference/cli.mdx Documents the new waza update command and behavior/requirements.
README.md Updates update-notice guidance and adds waza update to command lists.
internal/version/check.go Centralizes installer URL + default recommended update command; notice now recommends waza update.
internal/version/check_test.go Updates notice assertion to match the new recommended update command text.
cmd/waza/root.go Registers the new command and prevents update checks from running during waza update.
cmd/waza/cmd_update.go Implements waza update including confirmation, --yes, and Bash detection.
cmd/waza/cmd_update_test.go Adds tests for update confirmation/skip, missing Bash guidance, and update-check skipping.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 1

Comment thread internal/version/check.go Outdated
Copilot AI added 2 commits May 23, 2026 10:39
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Comment thread cmd/waza/cmd_update.go
Comment thread install.ps1
Copilot AI added 2 commits May 23, 2026 10:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 15:03
@github-actions github-actions Bot merged commit 05501b1 into main May 23, 2026
6 of 7 checks passed
@spboyer spboyer removed the request for review from Copilot May 23, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants