diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-09-10 15:41:47 -0700 |
---|---|---|
committer | Nicolas Lacasse <nlacasse@google.com> | 2019-09-10 15:41:47 -0700 |
commit | c1a8275b470fe0d8390cba166d4937059fd89b8b (patch) | |
tree | e4d40834098c5209d815fd8f0f4ffb9c0cf9f206 /runsc/BUILD | |
parent | 849c57314f6b6f0d1ebcfa2e68762b8ea95f5948 (diff) |
Fix `runsc --version` and add a test.
We need to include the `--stamp` flag in `tools/workspace_status.sh` for
the version to be picked up by the linker. Not sure why.
Also changes the VERSION string to STABLE_VERSION, which will cause the
program to be re-linked if the string changes.
Fixes #830
Diffstat (limited to 'runsc/BUILD')
-rw-r--r-- | runsc/BUILD | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runsc/BUILD b/runsc/BUILD index a2a465e1e..44a325b6f 100644 --- a/runsc/BUILD +++ b/runsc/BUILD @@ -13,7 +13,7 @@ go_binary( visibility = [ "//visibility:public", ], - x_defs = {"main.version": "{VERSION}"}, + x_defs = {"main.version": "{STABLE_VERSION}"}, deps = [ "//pkg/log", "//pkg/refs", @@ -46,7 +46,7 @@ go_binary( visibility = [ "//visibility:public", ], - x_defs = {"main.version": "{VERSION}"}, + x_defs = {"main.version": "{STABLE_VERSION}"}, deps = [ "//pkg/log", "//pkg/refs", @@ -101,3 +101,10 @@ pkg_deb( "//visibility:public", ], ) + +sh_test( + name = "version_test", + data = [":runsc"], + size = "small", + srcs = ["version_test.sh"], +) |