Created
March 6, 2020 13:31
-
-
Save marcus-sa/8f395ef2fed6ac926a4a46fb5bc51d70 to your computer and use it in GitHub Desktop.
Setup Bazel binaries locally
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
#!/bin/bash | |
set -eo pipefail | |
bazelBin=$(node -p "require('@bazel/bazel').getNativeBinary()") | |
# Provide the bazel binary globally. We don't want to access the binary | |
# through Node as it could result in limited memory. | |
sudo chmod a+x ${bazelBin} | |
sudo cp ${bazelBin} /usr/local/bin/bazel |
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
#!/bin/bash | |
set -eo pipefail | |
bazelBin=$(node -p "require('@bazel/ibazel').getNativeBinary()") | |
# Provide the bazel binary globally. We don't want to access the binary | |
# through Node as it could result in limited memory. | |
sudo chmod a+x ${bazelBin} | |
sudo ln -fs ${bazelBin} /usr/local/bin/ibazel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refactor these with https://github.com/bazelbuild/bazelisk which is now the optimal way.