Reputation: 624
I am running bazel build using the environment variable:
TEST_TMPDIR=/tmp/.bazel
(This way it does not use ~/.cache/bazel and instead uses /tmp/.bazel)
After the build completes, I can do:
ls -lah /tmp/.bazel/_bazel_dev/
total 20K
drwxr-xr-x 5 dev root 4.0K Dec 15 13:26 .
drwxr-xr-x 3 dev root 4.0K Dec 15 13:26 ..
drwxr-xr-x 3 dev root 4.0K Dec 15 13:26 cache
drwxr-xr-x 8 dev root 4.0K Dec 15 13:36 f0dfd1906214c4c442535f524f4c9395
drwxr-xr-x 3 dev root 4.0K Dec 15 13:26 install
Now is there a bazel command (or bash commands) I can run to get the temp dir name? f0dfd1906214c4c442535f524f4c9395
If there are multiple such folders from builds of other unrelated projects also, I just want to get the dir name for my bazel build.
(The reason I need this is because I need some files from this directory for another build)
Upvotes: 0
Views: 1415
Reputation: 627
You want the output from bazel info
Most likely you are after the output_base
path but you should be able to find all the other paths you need from the output of that command.
Upvotes: 1