From a86fd1f32d75c6b1f34baf8381794a72acbd7f96 Mon Sep 17 00:00:00 2001 From: Jozef Marko Date: Wed, 4 Dec 2024 11:52:31 +0100 Subject: [PATCH] NO-ISSUE: Add CI check for the NOTICE Copyright year This CI Check should announce if the NOTICE Copyright year is not up to date with current calendar year --- .github/workflows/ci_check_license_headers.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_check_license_headers.yaml b/.github/workflows/ci_check_license_headers.yaml index cb3819f18a..de92c76e3f 100644 --- a/.github/workflows/ci_check_license_headers.yaml +++ b/.github/workflows/ci_check_license_headers.yaml @@ -38,3 +38,7 @@ jobs: - name: Run Apache RAT run: | java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers." + + - name: Check NOTICE Copyright year + run: | + (grep "Copyright $(date +%Y) The Apache Software Foundation" NOTICE && echo "NOTICE Copyright year is up to date") || echo "NOTICE Copyright year is outdated" && exit 1