Skip to content

Commit 87703ad

Browse files
ralf0131htynkn
authored andcommitted
Polish license check script (apache#4736)
* Polish license check script * Remove temp files
1 parent 2c92916 commit 87703ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

licenseCheck.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ else
1818
echo "checking whole project"
1919
fi
2020

21-
echo "Running command: ./mvnw clean package -DskipTests=true -PlicenseCheck $APPEND_ARG"
21+
echo "Running command: mvn clean package -DskipTests=true -PlicenseCheck $APPEND_ARG"
2222

23-
./mvnw clean package -DskipTests=true -PlicenseCheck $APPEND_ARG
23+
mvn clean package -DskipTests=true -PlicenseCheck $APPEND_ARG
2424

2525
status=$?
2626
if [ $status -eq 0 ]; then
@@ -91,7 +91,7 @@ allowLicense=(
9191
)
9292

9393
#filter allow license
94-
license_need_check=`cat $TARGET_FILE | grep -v "generated-sources/license/THIRD-PARTY.txt" | grep -v "third-party dependencies" | grep -v $LINE_FLAG`
94+
license_need_check=`cat $TARGET_FILE | grep -v "generated-sources/license/THIRD-PARTY.txt" | grep -v "third-party dependencies" | grep -v "The project has no dependencies." | grep -v $LINE_FLAG`
9595

9696
for i in "${allowLicense[@]}"; do
9797
license_need_check=`echo "$license_need_check"|grep -vi "$i"`
@@ -106,3 +106,5 @@ else
106106
echo "${red}Please check below license${reset}"
107107
cat license-need-check
108108
fi
109+
110+
rm -f license-list license-need-check

0 commit comments

Comments
 (0)