Add Linux support to install.sh and release builds for dev-cache/git-cleaner#71
Add Linux support to install.sh and release builds for dev-cache/git-cleaner#71markcallen wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Extends the repo’s installation and release tooling to support Linux for the cross-platform CLIs (dev-cache, git-cleaner) while keeping mac-cache-cleaner macOS-only.
Changes:
- Update
install.shto detectdarwinvslinux, install OS-appropriate defaults, and use${OS}in asset names. - Add Linux targets to GoReleaser builds for
dev-cacheandgit-cleaner, and generalize the combined archive name to include OS. - Update README install/release docs to reflect OS-specific behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
install.sh |
Adds Linux OS detection and switches release asset naming to ${app}-${os}-${arch}. |
README.md |
Documents OS-specific install behavior and release build matrix changes. |
.goreleaser.yaml |
Adds Linux build targets for dev-cache and git-cleaner; updates archive naming to include OS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
README.md
Outdated
| @@ -55,7 +57,9 @@ Add this to your shell profile (`~/.zshrc` or `~/.bashrc`) to make it permanent. | |||
|
|
|||
| - The script installs from the latest GitHub release archives. | |||
There was a problem hiding this comment.
The docs say the install script “installs from the latest GitHub release archives”, but install.sh downloads a single release asset per binary (not an archive) from .../releases/download/.... Please reword this to avoid confusing users who are troubleshooting downloads.
| - The script installs from the latest GitHub release archives. | |
| - The script downloads the latest GitHub release binaries for the selected apps from the `releases/download` assets. |
README.md
Outdated
| - Supported OS values are `darwin` and `linux`. | ||
| - Use `-a <app>` to install a single binary (`dev-cache`, `git-cleaner`, or `mac-cache-cleaner`). | ||
| - On Linux, default install includes `dev-cache` and `git-cleaner`; `mac-cache-cleaner` is macOS-only. | ||
| - The script exits early with an error (without partial installs) if required flags or tools are missing. |
There was a problem hiding this comment.
The bullet “exits early with an error (without partial installs) …” doesn’t match current behavior: the script installs apps in a loop, so a failure downloading/installing the 2nd/3rd binary can leave earlier binaries already installed. Either update the wording (e.g., “may partially install”) or change the script to stage all downloads first and only move into place after all succeed.
| - The script exits early with an error (without partial installs) if required flags or tools are missing. | |
| - The script exits early with an error if required flags or tools are missing; when installing multiple apps, a failure part-way through may leave earlier apps installed (partial install). |
| name_template: "cache-cleaner-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
| files: | ||
| - none* # Only include binaries, no extra files | ||
|
|
There was a problem hiding this comment.
install.sh now downloads per-app assets named ${APP_NAME}-${OS}-${ARCH} (e.g. dev-cache-linux-amd64), but in this GoReleaser config I only see a combined archive artifact (cache-cleaner-{{ .Version }}-{{ .Os }}-{{ .Arch }}) being defined. Unless there is another (missing) artifact configuration, the Linux installer URLs will 404. Consider either (a) adding GoReleaser artifacts that publish per-app binaries with the ${app}-${os}-${arch} naming for linux as well, or (b) updating install.sh to download the cache-cleaner-* archive and extract the requested binaries.
| # Per-app Linux binaries for install.sh (${APP_NAME}-${OS}-${ARCH}) | |
| - id: per-app-linux-binaries | |
| format: binary | |
| builds: | |
| - dev-cache | |
| - git-cleaner | |
| goos: | |
| - linux | |
| name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}" |
Summary
install.shOS detection to support bothdarwinandlinuxdev-cache+git-cleaneron Linux; all three on macOS)mac-cache-cleanermacOS-only with a clear Linux error${OS}in release asset download naming ininstall.shdev-cacheandgit-cleanerfor Linux in GoReleaserIssues
Validation
sh -n install.shmake test