Skip to content

feat(cli): add update command for self-updating the binary - #194

Merged
AJenbo merged 2 commits into
PHPantom-dev:mainfrom
calebdw:calebdw/push-lnrmuulyqlpx
Jul 6, 2026
Merged

feat(cli): add update command for self-updating the binary#194
AJenbo merged 2 commits into
PHPantom-dev:mainfrom
calebdw:calebdw/push-lnrmuulyqlpx

Conversation

@calebdw

@calebdw calebdw commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Adds a new phpantom_lsp update subcommand that downloads the latest release from GitHub and replaces the current binary.

Features:

  • --check: dry run, exits 0 if up-to-date, 1 if update available
  • --no-confirm: skip confirmation prompt (for CI/scripts)
  • Semver-aware version comparison (ignores git-describe suffixes)
  • Platform auto-detection for all 6 supported targets
  • .tar.gz extraction (Unix) and .zip extraction (Windows)
  • Atomic binary replacement via self-replace crate

New dependencies: ureq (HTTP), tar, flate2, zip (archives), self-replace (binary swap).

Closes #107

@codecov-commenter

codecov-commenter commented Jul 4, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 18.18182% with 180 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/self_update.rs 18.18% 180 Missing ⚠️

📢 Thoughts on this report? Let us know!

@calebdw
calebdw force-pushed the calebdw/push-lnrmuulyqlpx branch 2 times, most recently from 92ff8ce to c5c8c2f Compare July 4, 2026 04:07
@AJenbo

AJenbo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Going online is scary, we should couple it with this #177

@calebdw

calebdw commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

Hmm, doesn't look like I have the permissions to make that change so it will have to be done when you're ready. Not sure that there's any blockers to it though

calebdw and others added 2 commits July 6, 2026 23:42
Adds a new `phpantom_lsp update` subcommand that downloads the latest
release from GitHub and replaces the current binary.

Features:
  - `--check`: dry run, exits 0 if up-to-date, 1 if update available
  - `--no-confirm`: skip confirmation prompt (for CI/scripts)
  - Semver-aware version comparison (ignores git-describe suffixes)
  - Platform auto-detection for all 6 supported targets
  - `.tar.gz` extraction (Unix) and `.zip` extraction (Windows)
  - Atomic binary replacement via `self-replace` crate

New dependencies: ureq (HTTP), tar, flate2, zip (archives),
self-replace (binary swap).

Closes PHPantom-dev#107
Signed-off-by: Anders Jenbo <anders@jenbo.dk>
@AJenbo
AJenbo force-pushed the calebdw/push-lnrmuulyqlpx branch from 69e771f to e5cf17f Compare July 6, 2026 22:03
@AJenbo
AJenbo merged commit 2705233 into PHPantom-dev:main Jul 6, 2026
6 of 7 checks passed
@calebdw
calebdw deleted the calebdw/push-lnrmuulyqlpx branch July 6, 2026 22:25
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.

Add self-update command for updating the binary

3 participants