[Bug]: expand_template FORMATTED_DATE
trentontrees opened this issue · 0 comments
trentontrees commented
What happened?
the volatile FORMATTED_DATE
is not being replaced during expand_template. But BUILD_TIMESTAMP
does get replaced.
Version
Development (host) and target OS/architectures:
OSX, darwin, arm64
Output of bazel --version
:
bazel 7.0.2
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
bazel_dep(name = "aspect_bazel_lib", version = "2.3.0")
Language(s) and/or frameworks involved:
How to reproduce
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
expand_template(
name = "labels",
out = "labels.txt",
stamp = 1,
stamp_substitutions = {
"{{_BUILD_TIME}}": "{{FORMATTED_DATE}}",
},
template = [
"BUILD_TIME={{_BUILD_TIME}}",
],
)
Expected: cat labels.txt
BUILD_TIME=2024 Apr 29 21 21 05 Mon
Actual: cat labels.txt
BUILD_TIME={{FORMATTED_DATE}}
Any other information?
No response