Skip to content

feat(cli): add self-update command#23

Open
Shengming Liang (LiangShengming) wants to merge 4 commits into
mainfrom
feat/self-update-command
Open

feat(cli): add self-update command#23
Shengming Liang (LiangShengming) wants to merge 4 commits into
mainfrom
feat/self-update-command

Conversation

@LiangShengming

@LiangShengming Shengming Liang (LiangShengming) commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

What:

Add a custom dedalus update command with --check, install-method detection, and update dispatch for Homebrew cask, macOS/Linux install-script installs, and Windows installer instructions. The install script now writes a .dedalus-cli-install marker so custom install directories remain updateable without requiring users to re-export DEDALUS_INSTALL_DIR.

Why:

Users need an explicit CLI update path that respects how the binary was installed. Custom install dirs previously depended on ambient shell state, which made updates fragile once the original install command was gone from the environment.

Test Plan

  • bash -n scripts/install.sh
  • go test -run 'Test(Update|Latest)' ./pkg/cmd
  • go build ./...
  • ./scripts/lint
  • ./scripts/test

Repro / Showcase

N/A. CLI update behavior is covered by unit tests with local HTTP servers and stubbed command runners; dedalus update --check exercises release discovery without installing.

Tests Added

  • Unit tests

  • Integration tests

  • E2E tests

  • N/A (no new code paths)

  • Repository README:

    • README.md @ b3ea11f documents dedalus update and dedalus update --check.

Risk areas:

  • latestVersion relies on GitHub's /releases/latest redirect and parses the /tag/ location.
  • Install-script detection intentionally accepts either the default ~/.local/bin path, a durable .dedalus-cli-install marker, or the legacy DEDALUS_INSTALL_DIR environment hint.
  • Windows prints PowerShell installer instructions instead of trying to overwrite the running dedalus.exe process.

@LiangShengming Shengming Liang (LiangShengming) removed the request for review from annyzhou June 24, 2026 01:25
@LiangShengming Shengming Liang (LiangShengming) marked this pull request as ready for review June 24, 2026 01:26
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.

1 participant