summaryrefslogtreecommitdiffhomepage
path: root/tools/bazeldefs
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-01-08 18:01:05 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-08 18:03:17 -0800
commit0c99ab70905fa4eaf8bc7b0ca846e12d7bbc6e39 (patch)
tree426d2500979192e3d32778bdb492f54119303856 /tools/bazeldefs
parent70de1db82e9d3b2c4491031f1f8a9c5a5830c7c0 (diff)
Support releasing aarch64 builds.
This change works around an issue in rules_pkg, described here: https://github.com/bazelbuild/rules_pkg/pull/263 PiperOrigin-RevId: 350869030
Diffstat (limited to 'tools/bazeldefs')
-rw-r--r--tools/bazeldefs/BUILD8
-rw-r--r--tools/bazeldefs/defs.bzl1
-rw-r--r--tools/bazeldefs/pkg.bzl3
3 files changed, 11 insertions, 1 deletions
diff --git a/tools/bazeldefs/BUILD b/tools/bazeldefs/BUILD
index a4a605346..ebe90dfec 100644
--- a/tools/bazeldefs/BUILD
+++ b/tools/bazeldefs/BUILD
@@ -37,3 +37,11 @@ config_setting(
},
visibility = ["//visibility:private"],
)
+
+genrule(
+ name = "version",
+ outs = ["version.txt"],
+ cmd = "cat bazel-out/stable-status.txt | grep STABLE_VERSION | cut -d' ' -f2- >$@",
+ stamp = True,
+ visibility = ["//:sandbox"],
+)
diff --git a/tools/bazeldefs/defs.bzl b/tools/bazeldefs/defs.bzl
index 58ced5167..7875bbaea 100644
--- a/tools/bazeldefs/defs.bzl
+++ b/tools/bazeldefs/defs.bzl
@@ -7,6 +7,7 @@ build_test = _build_test
bzl_library = _bzl_library
more_shards = 4
most_shards = 8
+version = "//tools/bazeldefs:version"
def short_path(path):
return path
diff --git a/tools/bazeldefs/pkg.bzl b/tools/bazeldefs/pkg.bzl
index 56317d93f..ccc9bdeef 100644
--- a/tools/bazeldefs/pkg.bzl
+++ b/tools/bazeldefs/pkg.bzl
@@ -1,6 +1,7 @@
"""Packaging rules."""
-load("@rules_pkg//:pkg.bzl", _pkg_deb = "pkg_deb", _pkg_tar = "pkg_tar")
+# N.B. We refer to pkg_deb_impl to avoid the macro, which cannot use select.
+load("@rules_pkg//:pkg.bzl", _pkg_deb = "pkg_deb_impl", _pkg_tar = "pkg_tar")
pkg_deb = _pkg_deb
pkg_tar = _pkg_tar