Add 'container-compose update' self-update command#10
Merged
Conversation
Checks the latest GitHub Release, downloads the signed + notarized .pkg, verifies its signature (pkgutil --check-signature), and installs it via the macOS installer (which places the plugin correctly and prompts for admin). --check reports without installing; --force overrides the up-to-date guard. Works regardless of how the binary was installed. Adds a SemVer comparator (prerelease sorts before the final release) with unit tests, and a container-composeTests target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Smooth in-place updates without an external package manager.
What
container compose update— fetches the latest GitHub Release, downloads the signed + notarized.pkg, verifies its signature (pkgutil --check-signature), and installs it viasudo installer(which places the plugin under/usr/local/libexec/container-plugins/and prompts for admin).--checkreports whether a newer version exists without installing;--forceinstalls even if it looks up to date (handy for dev builds).Why not Homebrew
A brew formula can't place the plugin where
containerlooks (outside brew's prefix). A cask installing the .pkg would work but needs a maintained tap. A built-in updater is self-contained and verifies the signature itself. (A cask+tap can still be added later for brew users.)Tests
SemVercomparator (prerelease sorts before the final release) with unit tests in a newcontainer-composeTeststarget. 28 tests pass.update --checkverified manually against the live Releases API (dev build vs v0.0.6).installerpath isn't exercised in CI (needs network + admin); the read/compare path is.Run
gh workflow run release.yml -f version=X.Y.Zto ship a release the updater can find.