Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: expand_template FORMATTED_DATE #827

Open
trentontrees opened this issue Apr 29, 2024 · 0 comments
Open

[Bug]: expand_template FORMATTED_DATE #827

trentontrees opened this issue Apr 29, 2024 · 0 comments
Labels
bug Something isn't working untriaged Requires traige

Comments

@trentontrees
Copy link

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

@trentontrees trentontrees added the bug Something isn't working label Apr 29, 2024
@github-actions github-actions bot added the untriaged Requires traige label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

1 participant