mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 05:46:34 +02:00
Adds a CLI subcommand that downloads the latest GitHub release for the current GOOS/GOARCH, verifies its sha256 against checksums.txt, extracts the archive, and atomically replaces the running binary. zot update install the latest release zot update --check show whether one is available, install nothing zot update --help usage Dispatch follows the same router shape as runBotCommand / runExtCommand in cli.go. Asset naming stays in sync with the archives.name_template in .goreleaser.yaml (zot_<ver>_<os>_<arch>). Reuses fetchLatestRelease + versionLess from update.go so the "what's latest" answer is identical to the in-TUI banner. Refuses to operate on dev builds (version 0.0.0) since the version comparison is meaningless and we'd happily downgrade a freshly compiled local build back to whatever ships on GitHub. $GITHUB_TOKEN is honoured so private-repo releases work. Unix: atomic os.Rename in place (the kernel keeps the running binary's inode alive until exit). Windows: rename current aside to .old, drop the new exe in, leave the .old for next-update cleanup since the running process has it locked. |
||
|---|---|---|
| .. | ||
| agent | ||
| assets | ||
| auth | ||
| core | ||
| extproto | ||
| provider | ||
| skills | ||
| tui | ||