treewide: replace stampsrcs with embed
A rules_go maintainer suggested using embed instead of stampsrcs:
https://github.com/bazel-contrib/rules_go/issues/3507
For Kubernetes, this means we need to patch the version libraries.
Instead of creating a separate file for each variable, I put them all in
one file, which is parsed in an init function. This init function needs
to run before all other init functions, which access the variables.
Another benefit of this change is that versions are stamped in all
binaries which include Kubernetes client libraries, not just hyperkube.
Change-Id: Ib1157d3686fc35e0c4191d2fc8e165862a1973c7
Reviewed-on: https://review.monogon.dev/c/monogon/+/4208
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/node/core/tconsole/BUILD.bazel b/metropolis/node/core/tconsole/BUILD.bazel
index 2cae5df..f67e9b9 100644
--- a/metropolis/node/core/tconsole/BUILD.bazel
+++ b/metropolis/node/core/tconsole/BUILD.bazel
@@ -10,12 +10,11 @@
"statusbar.go",
"tconsole.go",
],
+ embedsrcs = [
+ "//build:copyright_line.txt", #keep
+ ],
importpath = "source.monogon.dev/metropolis/node/core/tconsole",
- stampsrcs = ["//build:stabler_status"],
visibility = ["//visibility:public"],
- x_defs = {
- "copyrightLine": "{STABLER_MONOGON_copyright}",
- },
deps = [
"//metropolis/node/core/network",
"//metropolis/node/core/roleserve",