Enable stamping and use correct variables
In D487 stamping was introduced, but not actually enabled. This enables it.
Kubernetes also uses "volatile" stamping variables for things that logic
depends on. This is a terrible idea because
you cannot unbreak a build since volatile stamps don't trigger a rebuild.
The status variables which are not purely informational have been changed
to "stable" variables
(see https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command).
Test Plan:
By itself not really testable, but has been tested on an
upcoming revision that actually depends on stamping behaving correctly.
X-Origin-Diff: phab/D491
GitOrigin-RevId: 48dda066d56e29d10fb0f0a88a845d8caf527c98
diff --git a/.bazelrc b/.bazelrc
index 0953943..d1d18db 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -8,5 +8,5 @@
# Build with C++17.
build --cxxopt=-std=c++17
-# Set workspace status file
-build --workspace_status_command=./build/print-workspace-status.sh
+# Set workspace status file and stamp
+build --stamp --workspace_status_command=./build/print-workspace-status.sh