This is an automated email from the ASF dual-hosted git repository.
vinishjail97 pushed a commit to branch branch-0.4
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git
The following commit(s) were added to refs/heads/branch-0.4 by this push:
new f4e52827 [872] Cover 2026 in the NOTICE copyright range and check it
at release time (#874)
f4e52827 is described below
commit f4e52827b9d530d7ed312f577dbd7413dfabbb34
Author: Vinish Reddy <[email protected]>
AuthorDate: Fri Jul 31 04:51:35 2026 +0530
[872] Cover 2026 in the NOTICE copyright range and check it at release time
(#874)
The source NOTICE still claimed "Copyright 2024-2025" while
0.4.0-incubating is
being released in 2026, so the 0.4.0-incubating-rc1 vote flagged the
distribution
years. The NOTICE inside the jars is generated by maven-remote-resources and
already said 2024-2026, so only the hand-maintained file at the repository
root
was stale.
validate_source_copyright.sh asserted that NOTICE exists but never read it,
which
is why the same drift happened for 2025 (#692) and then again for 2026. It
now
also checks that the copyright range starts at the pom.xml <inceptionYear>
and
ends at the year the release is being cut, so a stale NOTICE fails release
validation instead of reaching a vote.
---
NOTICE | 2 +-
release/scripts/validate_source_copyright.sh | 35 ++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/NOTICE b/NOTICE
index b5728fba..f15ce014 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache XTable (incubating)
-Copyright 2024-2025 The Apache Software Foundation
+Copyright 2024-2026 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
diff --git a/release/scripts/validate_source_copyright.sh
b/release/scripts/validate_source_copyright.sh
index 6c12f790..e306dc9d 100755
--- a/release/scripts/validate_source_copyright.sh
+++ b/release/scripts/validate_source_copyright.sh
@@ -40,6 +40,41 @@ if [ ! -f "$noticeFile" ]; then
fi
echo -e "\t\tNotice file exists ? [OK]\n"
+### Checking NOTICE distribution years
+# The copyright range has to cover the year the release is published, otherwise
+# every release cut after a new year ships a stale NOTICE (see XTABLE-692 and
the
+# 0.4.0-incubating-rc1 vote). Checking that the file merely exists is not
enough.
+echo "Checking NOTICE distribution years"
+currentYear=$(date +%Y)
+inceptionYear=$(sed -n 's:.*<inceptionYear>\(.*\)</inceptionYear>.*:\1:p'
./pom.xml | head -n 1)
+copyrightLine=$(grep -E '^Copyright [0-9]{4}(-[0-9]{4})? The Apache Software
Foundation$' "$noticeFile" | head -n 1)
+
+if [ -z "$copyrightLine" ]; then
+ echo "NOTICE does not contain a well-formed copyright line [ERROR]"
+ echo -e "\t\texpected: Copyright
${inceptionYear:-<inceptionYear>}-${currentYear} The Apache Software Foundation"
+ exit 1
+fi
+
+# Keep this portable: BSD/macOS sed has no GNU-style branch chaining, so split
the
+# "YYYY" / "YYYY-YYYY" range with parameter expansion instead.
+noticeYears=$(echo "$copyrightLine" | sed -E 's/^Copyright
([0-9]{4}(-[0-9]{4})?) .*/\1/')
+noticeStartYear="${noticeYears%%-*}"
+noticeEndYear="${noticeYears##*-}"
+
+if [ -n "$inceptionYear" ] && [ "$noticeStartYear" != "$inceptionYear" ]; then
+ echo "NOTICE copyright starts at ${noticeStartYear} but pom.xml
<inceptionYear> is ${inceptionYear} [ERROR]"
+ echo -e "\t\tfound: ${copyrightLine}"
+ exit 1
+fi
+
+if [ "$noticeEndYear" != "$currentYear" ]; then
+ echo "NOTICE copyright must cover the release year ${currentYear} but ends
at ${noticeEndYear} [ERROR]"
+ echo -e "\t\tfound: ${copyrightLine}"
+ echo -e "\t\texpected: Copyright ${noticeStartYear}-${currentYear} The
Apache Software Foundation"
+ exit 1
+fi
+echo -e "\t\tNOTICE copyright covers ${currentYear} ? [OK]\n"
+
### Licensing Check
echo "Performing custom Licensing Check "
numfilesWithNoLicense=`find . -iname '*' -type f | grep -v NOTICE | grep -v
LICENSE | grep -v '.jpg' | grep -v '.json' | grep -v '.hfile' | grep -v '.data'
| grep -v '.commit' | grep -v emptyFile | grep -v DISCLAIMER | grep -v KEYS |
grep -v '.mailmap' | grep -v '.sqltemplate' | grep -v 'banner.txt' | grep -v
"fixtures" | xargs grep -L "Licensed to the Apache Software Foundation (ASF)" |
wc -l`