Skip to content

Instantly share code, notes, and snippets.

@marcus-sa
Created March 6, 2020 13:31
Show Gist options
  • Save marcus-sa/8f395ef2fed6ac926a4a46fb5bc51d70 to your computer and use it in GitHub Desktop.
Save marcus-sa/8f395ef2fed6ac926a4a46fb5bc51d70 to your computer and use it in GitHub Desktop.
Setup Bazel binaries locally
#!/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
#!/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
@marcus-sa
Copy link
Author

marcus-sa commented Mar 6, 2020

Refactor these with https://github.com/bazelbuild/bazelisk which is now the optimal way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment