Fixed an error that bazel binary is not executable when testing with remote execution.
The cmd used to package final artifact didn't produce an executable file. It worked before since we always chmod(0555) the output files of a locally executed action and always set the input files to be executable when uploading to remote cache. However, this is no longer true with b6e3ba8abf033c6d3a318be8484021eff6a40dde. Tests can't execute the generated bazel binary with remote execution due to the missing executable bit.
This change add `chmod a+x` to the cmd to make sure the final artifact is executable.
PiperOrigin-RevId: 352784262
diff --git a/src/BUILD b/src/BUILD
index 67fe7f9..ad767d8 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -385,7 +385,7 @@
# In msys, a file path without .exe suffix(say foo), refers to a file with .exe
# suffix(say foo.exe), if foo.exe exists and foo doesn't. So, on windows, we
# need to remove bazel.exe first, so that cat to bazel won't fail.
- cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@",
+ cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@ && chmod a+x $@",
executable = 1,
output_to_bindir = 1,
visibility = [