From 0414444301875da9103218edb14e965813d59d16 Mon Sep 17 00:00:00 2001 From: Jozef Marko Date: Wed, 4 Dec 2024 12:01:40 +0100 Subject: [PATCH 1/2] Add NOTICE Copyright year check --- .github/workflows/ci_check_license_headers.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci_check_license_headers.yaml b/.github/workflows/ci_check_license_headers.yaml index 481fa933f3..ccd8432ed9 100644 --- a/.github/workflows/ci_check_license_headers.yaml +++ b/.github/workflows/ci_check_license_headers.yaml @@ -39,3 +39,8 @@ jobs: 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 + + From 4f697f924efc84fe8fd213c9f60b95b46e138d65 Mon Sep 17 00:00:00 2001 From: Jozef Marko Date: Wed, 4 Dec 2024 12:13:28 +0100 Subject: [PATCH 2/2] Add () --- .github/workflows/ci_check_license_headers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_check_license_headers.yaml b/.github/workflows/ci_check_license_headers.yaml index ccd8432ed9..6b642ecb6a 100644 --- a/.github/workflows/ci_check_license_headers.yaml +++ b/.github/workflows/ci_check_license_headers.yaml @@ -41,6 +41,6 @@ jobs: - 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 + (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)