Skip to content

Add version check and update subcommands for CLI self-update#154

Merged
blsmth merged 4 commits into
mainfrom
version-self-update
Jul 17, 2026
Merged

Add version check and update subcommands for CLI self-update#154
blsmth merged 4 commits into
mainfrom
version-self-update

Conversation

@blsmth

@blsmth blsmth commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Supersedes #111 (fork branch had merge conflicts with main after 4.7.0 was cut). Same change, rebased/merged onto current main with conflicts resolved (CHANGELOG entries moved under [Unreleased], versionInfo/--json from main kept alongside the new forceUpdate flag).

Original author: @SmileyChris.

Summary

  • Adds apppack version check to check for available updates
  • Adds apppack version update to download and install the latest release from GitHub
  • Adds --force flag to update even when already on latest version

Features

  • Cross-platform support (Linux, macOS Intel/ARM, Windows)
  • SHA256 checksum verification before binary replacement
  • Blocks Homebrew installs with helpful brew upgrade apppack message
  • Safe binary replacement with atomic rename and cross-device fallbacks

Notes

SmileyChris and others added 4 commits December 3, 2025 14:19
Adds `apppack version check` to check for available updates and
`apppack version update` to download and install the latest release
from GitHub.

Features:
- Cross-platform support (Linux, macOS Intel/ARM, Windows)
- SHA256 checksum verification before binary replacement
- Blocks Homebrew installs with helpful upgrade message
- Safe binary replacement with atomic rename and fallbacks
- --force flag to update even when already on latest version
Use io.CopyN with a 100MB limit instead of io.Copy when extracting
binaries from archives to prevent decompression bomb attacks.

Addresses GO-S2110 (CWE-409)
# Conflicts:
#	CHANGELOG.md
#	cmd/version.go
@blsmth
blsmth merged commit d4d9cd2 into main Jul 17, 2026
5 of 6 checks passed
@blsmth
blsmth deleted the version-self-update branch July 17, 2026 15:19
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.

2 participants