aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/packages/BUILD
diff options
context:
space:
mode:
authorGravatar philwo <philwo@google.com>2017-04-28 17:51:22 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-04-28 18:33:30 +0200
commit6f7066e3112315d259c00d5b68330a326391ec31 (patch)
treeb0f860baefa4d74dccc5cd4db0c58c78e18536ef /scripts/packages/BUILD
parent2541fd93287ff135c3348a3986cea7dfc8444f71 (diff)
Bundled JDK changes for the release process. This is a fixed version
that should not break CI this time... - Make the default Bazel release artifacts include the bundled JDK. - Create additional Bazel release artifacts without a bundled JDK. Tested by running "bazel build //scripts/..." in a clean checkout and one with this patch in, then diffing the entire bazel-out folder and manually inspecting the resulting files (zips, tar.gz, deb, rpm) to make sure that they contain the right files. Looks all good now, so let's try again. PiperOrigin-RevId: 154544164
Diffstat (limited to 'scripts/packages/BUILD')
-rw-r--r--scripts/packages/BUILD44
1 files changed, 31 insertions, 13 deletions
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD
index 1ebe901a77..a5318b99b4 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,29 +68,43 @@ 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(
+ name = "bazel-sh-with-jdk",
+ srcs = ["bazel.sh"],
+ outs = ["with-jdk/bazel"],
+ cmd = "mkdir -p $$(dirname $@); cp $< $@",
)
genrule(
- name = "rename-bazel-sh",
+ name = "bazel-sh-without-jdk",
srcs = ["bazel.sh"],
- outs = ["bazel"],
- cmd = "cp $< $@",
+ outs = ["without-jdk/bazel"],
+ cmd = "mkdir -p $$(dirname $@); cp $< $@",
)
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",
- ":bazel",
+ ":%s/bazel-real" % kind,
+ ":%s/bazel" % kind,
"//scripts:bash_completion",
],
launcher = ":launcher_bin.sh",
-)
+) for kind in ("with-jdk", "without-jdk")]
genrule(
name = "embedded_label",