diff options
author | Philipp Wollermann <philwo@google.com> | 2017-04-20 18:35:16 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-04-24 16:49:08 +0200 |
commit | 2c4dd1f3176371473667c551cd5a5ae5992f8154 (patch) | |
tree | ae14af405f97661dd04c632bc1fd4b7c092e4f33 /scripts/packages | |
parent | 8b6d96656f1e690c41d250110d91f310ae159756 (diff) |
Bundled JDK changes for the release process.
- Make the default Bazel release artifacts include the bundled JDK.
- Create additional Bazel release artifacts without a bundled JDK.
Change-Id: If87c986507ae8e7dbbf0e8f163dd0073a206b265
PiperOrigin-RevId: 153718827
Diffstat (limited to 'scripts/packages')
-rw-r--r-- | scripts/packages/BUILD | 29 | ||||
-rw-r--r-- | scripts/packages/self_extract_binary.bzl | 25 |
2 files changed, 34 insertions, 20 deletions
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD index 1ebe901a77..191f2701d7 100644 --- a/scripts/packages/BUILD +++ b/scripts/packages/BUILD @@ -17,16 +17,20 @@ filegroup( srcs = select({ "//src:windows": [], "//src:windows_msvc": [], + "//src:freebsd": [], "//src:darwin": [ - ":install.sh", + ":with-jdk/install.sh", + ":without-jdk/install.sh", ":generate-package-info", ], "//src:darwin_x86_64": [ - ":install.sh", + ":with-jdk/install.sh", + ":without-jdk/install.sh", ":generate-package-info", ], "//conditions:default": [ - ":install.sh", + ":with-jdk/install.sh", + ":without-jdk/install.sh", ":generate-package-info", "//:bazel-distfile", "//scripts/packages/debian:bazel-debian", @@ -64,9 +68,16 @@ genrule( genrule( name = "rename-bazel-bin", + srcs = ["//src:bazel_with_jdk"], + outs = ["with-jdk/bazel-real"], + cmd = "mkdir -p $$(dirname $@); cp $< $@", +) + +genrule( + name = "rename-bazel-bin-without-jdk", srcs = ["//src:bazel"], - outs = ["bazel-real"], - cmd = "cp $< $@", + outs = ["without-jdk/bazel-real"], + cmd = "mkdir -p $$(dirname $@); cp $< $@", ) genrule( @@ -78,15 +89,15 @@ genrule( load(":self_extract_binary.bzl", "self_extract_binary") -self_extract_binary( - name = "install.sh", +[self_extract_binary( + name = "%s/install.sh" % kind, flatten_resources = [ - ":bazel-real", + ":%s/bazel-real" % kind, ":bazel", "//scripts:bash_completion", ], launcher = ":launcher_bin.sh", -) +) for kind in ("with-jdk", "without-jdk")] genrule( name = "embedded_label", diff --git a/scripts/packages/self_extract_binary.bzl b/scripts/packages/self_extract_binary.bzl index 425a203b36..75f19279c3 100644 --- a/scripts/packages/self_extract_binary.bzl +++ b/scripts/packages/self_extract_binary.bzl @@ -75,18 +75,21 @@ def _self_extract_binary(ctx): self_extract_binary = rule( _self_extract_binary, - executable = True, attrs = { "launcher": attr.label( - mandatory=True, - allow_files=True, - single_file=True), - "empty_files": attr.string_list(default=[]), + mandatory = True, + allow_files = True, + single_file = True, + ), + "empty_files": attr.string_list(default = []), "resources": attr.label_list( - default=[], - allow_files=True), + default = [], + allow_files = True, + ), "flatten_resources": attr.label_list( - default=[], - allow_files=True), - }, - ) + default = [], + allow_files = True, + ), + }, + executable = True, +) |