diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2017-07-25 13:21:05 +0200 |
---|---|---|
committer | Jakob Buchgraber <buchgr@google.com> | 2017-07-25 13:38:59 +0200 |
commit | 9a63aff8bb771af8917903fbbc9df3b708e2c0ed (patch) | |
tree | 4b01fe601d7d35c867650c09182bfa3d4786956d | |
parent | 4e9190ae0198a90d5ab07ade3f2054b4125ea98f (diff) |
Create Windows ZIP release artifact using Bazel
The new pipeline does not support ziping artifact which was
a custom hack for Windows, relies on Bazel to generate those
zip instead.
Step forward fixing bazelbuild/continuous-integration#101
To cherry-pick for #3375.
Change-Id: Id566d66bb179096d60c5b535f245d64cea28c5b8
PiperOrigin-RevId: 163054883
-rw-r--r-- | scripts/packages/BUILD | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD index a5318b99b4..1c6cf4a150 100644 --- a/scripts/packages/BUILD +++ b/scripts/packages/BUILD @@ -15,7 +15,10 @@ filegroup( filegroup( name = "packages", srcs = select({ - "//src:windows": [], + "//src:windows": [ + ":zip-bazel-exe", + ":zip-bazel-exe_with_jdk", + ], "//src:windows_msvc": [], "//src:freebsd": [], "//src:darwin": [ @@ -52,6 +55,22 @@ genrule( tools = [":package-info-generator"], ) +[genrule( + name = "zip-bazel-exe" + suffix, + srcs = ["//src:bazel%s.exe" % suffix], + outs = ["bazel%s.zip" % suffix], + cmd = "\n".join([ + "tmpdir=$$(mktemp -d $${TMPDIR:-/tmp}/tmp.XXXXXXXX)", + "trap \"rm -fr $${tmpdir}\" EXIT", + "mv $(SRCS) $${tmpdir}/bazel.exe", + "touch -t 198001010000.00 $${tmpdir}/bazel.exe", + "zip -jq $@ $${tmpdir}/bazel.exe", + ]), +) for suffix in [ + "", + "_with_jdk", +]] + genrule( name = "generate-launcher", srcs = [ |