diff options
author | Adin Scannell <ascannell@google.com> | 2019-06-06 22:08:49 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-06-06 22:09:55 -0700 |
commit | e5fb3aab122c546441c595c2135a273468c5a997 (patch) | |
tree | 65ea5f4696069d3aedfe6dd1ef7daa58ac55c8e2 /runsc/BUILD | |
parent | c933f3eede5634bf778dfb757fb68d927a43a7a8 (diff) |
BUILD: Use runsc to generate version
This also ensures BUILD files are correctly formatted.
PiperOrigin-RevId: 251990267
Diffstat (limited to 'runsc/BUILD')
-rw-r--r-- | runsc/BUILD | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runsc/BUILD b/runsc/BUILD index af8e928c5..3d6c92e4c 100644 --- a/runsc/BUILD +++ b/runsc/BUILD @@ -1,6 +1,4 @@ -package( - licenses = ["notice"], # Apache 2.0 -) +package(licenses = ["notice"]) # Apache 2.0 load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_deb", "pkg_tar") @@ -84,8 +82,9 @@ pkg_tar( genrule( name = "deb-version", outs = ["version.txt"], - cmd = "cat bazel-out/volatile-status.txt | grep VERSION | sed 's/^[^0-9]*//' >$@", + cmd = "$(location :runsc) -version | head -n 1 | sed 's/^[^0-9]*//' > $@", stamp = 1, + tools = [":runsc"], ) pkg_deb( @@ -98,4 +97,7 @@ pkg_deb( package = "runsc", postinst = "debian/postinst.sh", version_file = ":version.txt", + visibility = [ + "//visibility:public", + ], ) |