From fed2b44c288d8f8964c6a5b02e7ec8db8a988efa Mon Sep 17 00:00:00 2001 From: Stefan Koelle Date: Sat, 22 Aug 2026 09:50:27 +0200 Subject: [PATCH] fix: upgrade CI to Go 1.25 and document self-update feature - Upgrade go-version from 1.24 to 1.25 in build.yml (required by go-selfupdate v1.6.0) - Add kctl-tui update command and interactive startup check to README.md - Document new features in CHANGELOG.md - Update Go version requirement to 1.25+ in README.md and CONTRIBUTING.md - Add Phase 5 (Self-update) to PLAN.md roadmap --- .github/workflows/build.yml | 4 ++-- CHANGELOG.md | 6 ++++++ CONTRIBUTING.md | 2 +- PLAN.md | 8 ++++++++ README.md | 7 ++++++- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a8cbcc..0d2b55b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: "1.24" + go-version: "1.25" cache: false - name: Tidy dependencies (generates/updates go.sum) @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: "1.24" + go-version: "1.25" cache: false - name: Tidy dependencies (generates/updates go.sum) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d73060..37fcdb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ## [Unreleased] +### Added +- `kctl-tui update` — self-update command that downloads the latest release + from GitHub and replaces the running binary +- Automatic update check on startup — prompts to update interactively when + a newer version is available + ## [0.2.0] - 2026-08-09 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e5e03d..3bf4dce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ go mod download ### Prerequisites -- Go 1.22+ +- Go 1.25+ - kubectl, k9s, tmux (or psmux on Windows) - An active Kubernetes cluster for integration testing diff --git a/PLAN.md b/PLAN.md index 1a72a2e..6c1cf13 100644 --- a/PLAN.md +++ b/PLAN.md @@ -77,6 +77,14 @@ is still open. For the full requirements, see [SPEC.md](SPEC.md). - [x] `--help` flag with full usage documentation. - [x] CHANGELOG.md, CONTRIBUTING.md, GitHub Issue/PR templates. +## Phase 5 — Self-update (done) + +- [x] `kctl-tui update` — self-update command using `go-selfupdate` library. + Downloads the matching OS/arch asset from GitHub Releases and replaces + the running binary atomically. +- [x] Interactive update check on startup — queries GitHub Releases in the + background, prompts the user to update when a newer version is found. + --- ## Bugfix Sprint — between v0.2.0 and v0.3.0 diff --git a/README.md b/README.md index 206e0b2..a36cda4 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ go build -o kctl-tui ./cmd/kctl-tui sudo mv kctl-tui /usr/local/bin/ ``` -Requires Go 1.22+. +Requires Go 1.25+. ### 📦 Prebuilt binaries @@ -203,11 +203,16 @@ kctl-tui # start the TUI (full navigation mode) kctl-tui --help # show all commands and flags kctl-tui --version # print version kctl-tui --verbose # enable debug logging to stderr +kctl-tui update # update to the latest release kctl-tui doctor # check if all tools, config and connections are OK kctl-tui config check # validate ~/.kctl-tui/config.yaml kctl-tui panel --context=... --ns=... --team=... # internal (called by tmux) ``` +When starting `kctl-tui` without a subcommand, a background check queries +GitHub Releases for a newer version. If one is found, you are prompted to +update interactively before the TUI starts. + ## 🛠️ Development ```bash