Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements an experimental auto-updater feature for slackdump that allows users to check for and automatically install updates. The implementation includes platform detection (macOS/Homebrew, Alpine/APK, Debian-Ubuntu/APT, Windows/Generic Binary), a GitHub API client for fetching release information, and update mechanisms appropriate for each platform. The feature is marked as experimental and added as a new command under slackdump tools update.
Changes:
- Added update checker that compares current version against GitHub releases
- Implemented platform-aware auto-update functionality supporting Homebrew, APK, APT, and direct binary downloads
- Created GitHub API client for anonymous access to release information
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/slackdump/internal/diag/update.go | New CLI command for checking and installing updates with -auto flag |
| cmd/slackdump/internal/diag/tools.go | Registered cmdUpdate in the tools command list |
| cmd/slackdump/internal/diag/updater/updater.go | Core updater logic with release comparison and version checking |
| cmd/slackdump/internal/diag/updater/updater_test.go | Tests for Release.Equal method |
| cmd/slackdump/internal/diag/updater/updater_mock_test.go | Generated mock for fetcher interface |
| cmd/slackdump/internal/diag/updater/autoupdate.go | Platform-specific update implementations (Homebrew, APK, APT, binary) |
| cmd/slackdump/internal/diag/updater/autoupdate_test.go | Tests for findAsset function |
| cmd/slackdump/internal/diag/updater/platform/platform.go | Platform and package manager detection logic |
| cmd/slackdump/internal/diag/updater/platform/platform_test.go | Tests for platform detection and version parsing |
| cmd/slackdump/internal/diag/updater/github/github.go | Anonymous GitHub API client for fetching releases |
| cmd/slackdump/internal/diag/updater/github/releases.go | Generated data structures for GitHub releases API |
| cmd/slackdump/internal/cfg/cfg.go | Added IsReleased method to BuildInfo for version validation |
| cmd/slackdump/internal/cfg/cfg_test.go | Tests for IsReleased method |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Owner
Author
|
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.
Fixes #541