bazelbuild / bazelisk

A user-friendly launcher for Bazel.
Apache License 2.0
1.96k stars 305 forks source link

Provide a macOS installer #39

Open jmmv opened 5 years ago

jmmv commented 5 years ago

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

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

philwo commented 5 years ago

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.

fweikert commented 5 years ago

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

mpassell commented 5 years ago

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)