bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Provide a macOS installer

Open jmmv opened this issue 5 years ago • 3 comments

I see that the "ideas for improvement" in the front page contains:

  • Add a Homebrew recipe for Bazelisk to make it easy to install on macOS.

... and I have quite a dislike for Homebrew. I'd suggest to provide a native macOS installer that places this tool in the correct location instead. It's actually quite easy to do so and avoids the need to install Homebrew (which some users may not have, like me, as I use pkgsrc).

Anyway, my main goal was to let you know that the packaging script I wrote for sandboxfs may help you get started: https://github.com/bazelbuild/sandboxfs/blob/master/admin/make-macos-pkg.sh . Was going to send you an email about this, but hey, I can also send this to you via a FR.

jmmv avatar Mar 03 '19 19:03 jmmv

We can surely create an installer for Bazelisk, but it's a single binary with no dependencies that you can put anywhere, so do we really need one? Maybe we could instead add a one-liner to the README.md on how to install it, something like:

To install Bazelisk on Linux or macOS, just download and put it into /usr/local/bin:

$ curl -O /usr/local/bin/bazelisk https://github.com/philwo/bazelisk/releases/download/v0.0.1/bazelisk-darwin-amd64 && chmod +x /usr/local/bin/bazelisk

You can also put it anywhere else on your PATH, for example another popular location is $HOME/bin.

The Homebrew repo has the advantage of making auto-upgrading and deploying it to multiple machines easier (not specific to Homebrew, any package manager would), which is something that wouldn't be addressed by a standalone installer.

philwo avatar Mar 03 '19 23:03 philwo

We actually have a Homebrew formula for Bazelisk: https://github.com/bazelbuild/homebrew-tap/blob/master/Formula/bazelisk.rb

fweikert avatar Mar 04 '19 22:03 fweikert

I have a more involved shell script doing essentially what @philwo describes above in https://github.com/philwo/bazelisk/issues/37 (just mentioning it here before I close that issue)

mpassell avatar Mar 07 '19 21:03 mpassell