Timestamp the static manifest's licences

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
Maartje Eyskens 2020-10-08 16:06:05 +02:00
parent 80284cca00
commit 50efbc0f6c
2 changed files with 14 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def licensed_file(
# This uses '#' as a way to denote a comment.
# This will likely need changing depending on the type of the file being
# generated.
license_boilerplate = "//hack/boilerplate:boilerplate.bzl.txt",
license_boilerplate = "//hack/boilerplate:boilerplate.bzl.timestamped.txt",
**kwargs,
):
native.genrule(

View File

@ -13,3 +13,16 @@ filegroup(
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
genrule(
name = "boilerplate.bzl.timestamped.txt",
srcs = [":boilerplate.bzl.txt"],
outs = ["boilerplate.bzl.timestamped.txt.out"],
cmd = " ".join([
"sed",
"s/YEAR/$$(date +\"%Y\")/",
"$(location :boilerplate.bzl.txt)",
"> $@",
]),
visibility = ["//visibility:public"],
)