Manage your Bazel environment
Bazel is fiddly. Projects that compile with one version of Bazel don’t work with another, and keeping multiple
versions of Bazel around is a pain. Bazenv solves this problem by managing your Bazel version on a project by project
basis. Bazenv is inspired by jenv
and rbenv
, which solve the same problem for Java and Ruby.
go get -d github.com/salesforce/bazenv/...
make deps install
. This will build bazenv
and its bazel
stub.$GOHOME/bin
is at the beginning of your path.bazenv install <version>
.bazenv global <version>
.bazenv install
to download and install any Bazel version onbazenv add
to add an existing Bazel install directory to Bazenv.bazenv list
.bazenv global
to set the global Bazel version. This version will be used unless specifically overridden withbazenv local
to set a local Bazel version for a given directory. This version will be used for all child~/.bazenv
directory..bazenv_version
files are used to configure the local Bazel version.bazel
shim reads from Bazenv’s configuration to locate the correct Bazel binary and execute it.bazel
shim is before any other bazel
binary on your path.bazenv doctor
will evaluate your Bazenv environment.