treewide: dynamically generate copyright line
A copyright line with hardcoded year was shown in various places of the
UI. Instead, take the year from the commit date.
Change-Id: I424d6c5b3aff34fe4479c37f30f9ea280b7eb4af
Reviewed-on: https://review.monogon.dev/c/monogon/+/4168
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/build/BUILD.bazel b/build/BUILD.bazel
index 20cfd57..3708a0b 100644
--- a/build/BUILD.bazel
+++ b/build/BUILD.bazel
@@ -12,6 +12,7 @@
"KUBERNETES_gitCommit",
"KUBERNETES_gitTreeState",
"KUBERNETES_buildDate",
+ "MONOGON_copyright",
],
visibility = ["//visibility:public"],
)
diff --git a/build/print-workspace-status.py b/build/print-workspace-status.py
index d54333d..b765e0c 100755
--- a/build/print-workspace-status.py
+++ b/build/print-workspace-status.py
@@ -56,6 +56,10 @@
variables["STABLE_MONOGON_gitCommit"] = git_commit
variables["STABLE_MONOGON_gitTreeState"] = git_tree_state
+copyright_year = git_commit_date.partition("-")[0]
+copyright_line = f"Copyright 2020-{copyright_year} The Monogon Project Authors"
+variables["STABLE_MONOGON_copyright"] = copyright_line
+
# Per product. Each product has it's own semver-style version number, which is
# deduced from git tags.
#