1
0

[HUDI-3837] Fix license and rat check settings (#5273)

- add missing licenses
- fix CI setting to run rat plugin
- fix deploy script to include integ test modules
This commit is contained in:
Raymond Xu
2022-04-09 11:01:18 -07:00
committed by GitHub
parent 81b25c543a
commit 5e65aefc61
11 changed files with 89 additions and 19 deletions

View File

@@ -72,6 +72,7 @@ rsync -a \
--exclude ".idea" --exclude "*.iml" --exclude ".DS_Store" --exclude "build-target" \
--exclude "docs/content" --exclude ".rubydeps" \
--exclude "rfc" \
--exclude "docker/images" \
. hudi-$RELEASE_VERSION
tar czf ${RELEASE_DIR}/hudi-${RELEASE_VERSION}.src.tgz hudi-$RELEASE_VERSION

View File

@@ -73,6 +73,6 @@ fi
for v in "${ALL_VERSION_OPTS[@]}"
do
echo "Deploying to repository.apache.org with version option ${v}"
COMMON_OPTIONS="${v} -Prelease -DskipTests -DretryFailedDeploymentCount=10 -DdeployArtifacts=true"
COMMON_OPTIONS="${v} -DdeployArtifacts=true -DskipTests -DretryFailedDeploymentCount=10"
$MVN clean deploy $COMMON_OPTIONS
done

View File

@@ -124,7 +124,7 @@ numBinaryFiles=`find . -iname '*' | xargs -I {} file -I {} | grep -va directory
if [ "$numBinaryFiles" -gt "0" ]; then
echo -e "There were non-text files in source release. Please check below\n"
find . -iname '*' | xargs -I {} file -I {} | grep -va directory | grep -v "/src/test/" | grep -va 'application/json' | grep -va 'text/' | grep -va 'application/xml'
exit -1
exit 1
fi
echo -e "\t\tNo Binary Files in Source Release? - [OK]\n"
### END: Binary Files Check
@@ -134,7 +134,7 @@ echo "Checking for DISCLAIMER"
disclaimerFile="./DISCLAIMER"
if [ -f "$disclaimerFile" ]; then
echo "DISCLAIMER file should not be present "
exit -1
exit 1
fi
echo -e "\t\tDISCLAIMER file exists ? [OK]\n"
@@ -144,23 +144,23 @@ licenseFile="./LICENSE"
noticeFile="./NOTICE"
if [ ! -f "$licenseFile" ]; then
echo "License file missing"
exit -1
exit 1
fi
echo -e "\t\tLicense file exists ? [OK]"
if [ ! -f "$noticeFile" ]; then
echo "Notice file missing"
exit -1
exit 1
fi
echo -e "\t\tNotice file exists ? [OK]\n"
### Licensing Check
echo "Performing custom Licensing Check "
numfilesWithNoLicense=`find . -iname '*' -type f | grep -v NOTICE | grep -v LICENSE | grep -v '.json' | grep -v '.data'| grep -v '.commit' | grep -v DISCLAIMER | grep -v KEYS | grep -v '.mailmap' | grep -v '.sqltemplate' | grep -v 'ObjectSizeCalculator.java' | grep -v 'AvroConversionHelper.scala' | grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software Foundation (ASF)" | wc -l`
numfilesWithNoLicense=`find . -iname '*' -type f | grep -v NOTICE | grep -v LICENSE | grep -v '.json' | grep -v '.hfile' | grep -v '.data' | grep -v '.commit' | grep -v DISCLAIMER | grep -v KEYS | grep -v '.mailmap' | grep -v '.sqltemplate' | grep -v 'ObjectSizeCalculator.java' | grep -v 'AvroConversionHelper.scala' | grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software Foundation (ASF)" | wc -l`
if [ "$numfilesWithNoLicense" -gt "0" ]; then
echo "There were some source files that did not have Apache License"
find . -iname '*' -type f | grep -v NOTICE | grep -v LICENSE | grep -v '.json' | grep -v '.data' | grep -v '.commit' | grep -v DISCLAIMER | grep -v '.sqltemplate' | grep -v KEYS | grep -v '.mailmap' | grep -v 'ObjectSizeCalculator.java' | grep -v 'AvroConversionHelper.scala' | grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software Foundation (ASF)"
exit -1
find . -iname '*' -type f | grep -v NOTICE | grep -v LICENSE | grep -v '.json' | grep -v '.hfile' | grep -v '.data' | grep -v '.commit' | grep -v DISCLAIMER | grep -v '.sqltemplate' | grep -v KEYS | grep -v '.mailmap' | grep -v 'ObjectSizeCalculator.java' | grep -v 'AvroConversionHelper.scala' | grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software Foundation (ASF)"
exit 1
fi
echo -e "\t\tLicensing Check Passed [OK]\n"