From 91304e6d730311fa1d3fb9638d1b8b635ead55eb Mon Sep 17 00:00:00 2001 From: CalvinKirs Date: Tue, 9 Feb 2021 12:15:03 +0800 Subject: [PATCH] test --- tools/dependencies/check-LICENSE.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/dependencies/check-LICENSE.sh b/tools/dependencies/check-LICENSE.sh index 0072554e29..ef2e408414 100755 --- a/tools/dependencies/check-LICENSE.sh +++ b/tools/dependencies/check-LICENSE.sh @@ -25,12 +25,10 @@ tar -zxf dolphinscheduler-dist/target/apache-dolphinscheduler*-bin.tar.gz --stri # licenses echo '=== Self modules: ' && ./mvnw --batch-mode --quiet -Dexec.executable='echo' -Dexec.args='${project.artifactId}-${project.version}.jar' exec:exec | tee self-modules.txt -echo '=== Distributed dependencies: ' && find dist/lib -name "*.jar" | tee all-dependencies.txt -# The prefix "dist/lib/" (9 chars) should be stripped to be ready to compare -sed -i 's/.\{9\}//' all-dependencies.txt +echo '=== Distributed dependencies: ' && find dist/lib -name "*.jar" -exec basename {} + | uniq | sort | tee all-dependencies.txt # Exclude all self modules(jars) to generate all third-party dependencies -echo '=== Third party dependencies: ' && grep -vf self-modules.txt all-dependencies.txt | tee third-party-dependencies.txt +echo '=== Third party dependencies: ' && grep -vf self-modules.txt all-dependencies.txt | uniq | sort | tee third-party-dependencies.txt # 1. Compare the third-party dependencies with known dependencies, expect that all third-party dependencies are KNOWN # and the exit code of the command is 0, otherwise we should add its license to LICENSE file and add the dependency to @@ -38,4 +36,4 @@ echo '=== Third party dependencies: ' && grep -vf self-modules.txt all-dependenc # command in target OS is different from what we used to sort the file `known-dependencies.txt`, i.e. "sort the two file # using the same command (and default arguments)" -diff -w -B -U0 <(sort < tools/dependencies/known-dependencies.txt) <(sort < third-party-dependencies.txt) +diff -w -B -U0 <(sort < tools/dependencies/known-dependencies.txt) <(sort < third-party-dependencies.txt) \ No newline at end of file