feat(bazel): introduce a binary stamping feature (#22176)

This grabs version control metadata and makes it available in the build, eg. to put in the version field for released artifacts

PR Close #22176
This commit is contained in:
Alex Eagle
2018-02-13 08:20:35 -08:00
committed by Victor Berchet
parent a069e08354
commit bba65e0f41
5 changed files with 97 additions and 1 deletions

View File

@ -1 +1,9 @@
# Marker file indicating this folder is a Bazel package
# Executes the workspace_status_command and provides the result.
# See the section on stamping in docs/BAZEL.md
genrule(
name = "stamp_data",
outs = ["stamp_data.txt"],
cmd = "cat bazel-out/volatile-status.txt > $@",
stamp = True,
visibility = ["//:__subpackages__"],
)