Delete downloaded archive after hashing in dump_remote_jdk_configs (#372) The dump_remote_jdk_configs genrule downloads each remote JDK archive to a per-iteration mktemp file to compute its sha256, but never removes it. A full run fetches every configured JDK (all versions and platforms, ~200 MB each), so it leaves roughly 7 GB of archives behind in /tmp. Remove the temp file at the end of each loop iteration, keeping peak /tmp usage to a single archive instead of the whole set. Closes #372 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_java/pull/372 from davido:cleanup-dump-jdk-configs-tmpfiles 2925ac55a7c03a087cec045688f01ab9c0493934 PiperOrigin-RevId: 960780649 Change-Id: I595703b694a6c131c2fbcf7c193acc36a6bb8ebd
diff --git a/java/bazel/BUILD.bazel b/java/bazel/BUILD.bazel index 225628e..f3c47cf 100644 --- a/java/bazel/BUILD.bazel +++ b/java/bazel/BUILD.bazel
@@ -39,6 +39,7 @@ echo " urls = $$urls," echo " version = \\"$$version\\"," echo ")," + rm -f "$$TMP_FILE" done <<< '{configs}' >> $@ """.format(configs = "\n".join([ "|".join([