Skip to content

Add Linux support to install.sh and release builds for dev-cache/git-cleaner#71

Open
markcallen wants to merge 2 commits intomainfrom
feat/2-install-release
Open

Add Linux support to install.sh and release builds for dev-cache/git-cleaner#71
markcallen wants to merge 2 commits intomainfrom
feat/2-install-release

Conversation

@markcallen
Copy link
Owner

Summary

  • Extend install.sh OS detection to support both darwin and linux
  • Install OS-appropriate defaults (dev-cache + git-cleaner on Linux; all three on macOS)
  • Keep mac-cache-cleaner macOS-only with a clear Linux error
  • Use ${OS} in release asset download naming in install.sh
  • Build dev-cache and git-cleaner for Linux in GoReleaser
  • Update root README install/release docs to reflect OS-specific behavior

Issues

Validation

  • sh -n install.sh
  • make test

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to detect darwin vs linux, install OS-appropriate defaults, and use ${OS} in asset names.
  • Add Linux targets to GoReleaser builds for dev-cache and git-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.
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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).

Copilot uses AI. Check for mistakes.
name_template: "cache-cleaner-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
files:
- none* # Only include binaries, no extra files

Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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 }}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Linux and Windows (WSL) installation support for dev-cache and git-cleaner

2 participants