aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar philwo <philwo@google.com>2017-04-24 17:57:48 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-04-24 18:00:50 +0200
commit40f5c71180ce22c0bd469d1ba089d2bfb517e830 (patch)
tree8344cec7b7abb2b06bc14849c689e6eb6926c785
parentaac13242c1e2bb6d1870e1284795bd3ca370984c (diff)
Automated g4 rollback of commit 2c4dd1f3176371473667c551cd5a5ae5992f8154.
*** Reason for rollback *** Breaks CI because //scripts/packages/debian:bazel-bin still references //scripts/packages:bazel-real. *** Original change description *** 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: 154054435
-rwxr-xr-xscripts/ci/build.sh6
-rwxr-xr-xscripts/ci/windows/compile_windows.sh10
-rw-r--r--scripts/packages/BUILD29
-rw-r--r--scripts/packages/self_extract_binary.bzl25
4 files changed, 25 insertions, 45 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index 6599e72b80..08c7389470 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -142,11 +142,7 @@ function bazel_build() {
# Copy the results to the output directory
mkdir -p $1/packages
cp bazel-bin/src/bazel $1/bazel
- # The version with a bundled JDK may not exist on all platforms.
- if [ "${JAVA_VERSION}" = "1.8" -a -e "bazel-bin/scripts/packages/with-jdk/install.sh" ]; then
- cp bazel-bin/scripts/packages/with-jdk/install.sh $1/bazel-${release_label}-installer.sh
- fi
- cp bazel-bin/scripts/packages/without-jdk/install.sh $1/bazel-${release_label}-without-jdk-installer.sh
+ cp bazel-bin/scripts/packages/install.sh $1/bazel-${release_label}-installer.sh
if [ "$PLATFORM" = "linux" ]; then
cp bazel-bin/scripts/packages/debian/bazel-debian.deb $1/bazel_${release_label}.deb
cp -f bazel-genfiles/scripts/packages/debian/bazel.dsc $1/bazel.dsc
diff --git a/scripts/ci/windows/compile_windows.sh b/scripts/ci/windows/compile_windows.sh
index 4168f551b5..802edaeeaa 100755
--- a/scripts/ci/windows/compile_windows.sh
+++ b/scripts/ci/windows/compile_windows.sh
@@ -48,13 +48,11 @@ fi
${BOOTSTRAP_BAZEL} --bazelrc=${BAZELRC:-/dev/null} --nomaster_bazelrc build \
--embed_label=${release_label} --stamp \
${MSVC_OPTS} \
- //src:bazel //src:bazel_with_jdk
+ //src:bazel
-# Copy the resulting artifacts.
+
+# Copy the resulting artifact.
mkdir -p output/ci
-cp bazel-bin/src/bazel output/ci/bazel${MSVC_LABEL}-$(get_full_release_name)-without-jdk.exe
-cp bazel-bin/src/bazel_with_jdk output/ci/bazel${MSVC_LABEL}-$(get_full_release_name).exe
+cp bazel-bin/src/bazel output/ci/bazel${MSVC_LABEL}-$(get_full_release_name).exe
cp bazel-bin/src/bazel output/bazel.exe
-zip -j output/ci/bazel${MSVC_LABEL}-$(get_full_release_name)-without-jdk.zip output/bazel.exe
-cp -f bazel-bin/src/bazel_with_jdk output/bazel.exe
zip -j output/ci/bazel${MSVC_LABEL}-$(get_full_release_name).zip output/bazel.exe
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD
index 191f2701d7..1ebe901a77 100644
--- a/scripts/packages/BUILD
+++ b/scripts/packages/BUILD
@@ -17,20 +17,16 @@ filegroup(
srcs = select({
"//src:windows": [],
"//src:windows_msvc": [],
- "//src:freebsd": [],
"//src:darwin": [
- ":with-jdk/install.sh",
- ":without-jdk/install.sh",
+ ":install.sh",
":generate-package-info",
],
"//src:darwin_x86_64": [
- ":with-jdk/install.sh",
- ":without-jdk/install.sh",
+ ":install.sh",
":generate-package-info",
],
"//conditions:default": [
- ":with-jdk/install.sh",
- ":without-jdk/install.sh",
+ ":install.sh",
":generate-package-info",
"//:bazel-distfile",
"//scripts/packages/debian:bazel-debian",
@@ -68,16 +64,9 @@ 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 = ["without-jdk/bazel-real"],
- cmd = "mkdir -p $$(dirname $@); cp $< $@",
+ outs = ["bazel-real"],
+ cmd = "cp $< $@",
)
genrule(
@@ -89,15 +78,15 @@ genrule(
load(":self_extract_binary.bzl", "self_extract_binary")
-[self_extract_binary(
- name = "%s/install.sh" % kind,
+self_extract_binary(
+ name = "install.sh",
flatten_resources = [
- ":%s/bazel-real" % kind,
+ ":bazel-real",
":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 75f19279c3..425a203b36 100644
--- a/scripts/packages/self_extract_binary.bzl
+++ b/scripts/packages/self_extract_binary.bzl
@@ -75,21 +75,18 @@ 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,
- ),
- },
- executable = True,
-)
+ default=[],
+ allow_files=True),
+ },
+ )