This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new e913a102d92 [fix][ci] Check full build artifacts licenses (#18171)
e913a102d92 is described below

commit e913a102d928ab0450494f5b775ae8b28ddddce8
Author: tison <[email protected]>
AuthorDate: Mon Oct 24 22:25:04 2022 +0800

    [fix][ci] Check full build artifacts licenses (#18171)
---
 .github/workflows/pulsar-ci.yaml | 4 ++++
 src/check-binary-license.sh      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index a488fca2f17..f996725e3be 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -544,6 +544,10 @@ jobs:
           -Pmain,docker -Dmaven.test.skip=true -Ddocker.squash=true \
           -Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true 
-Drat.skip=true
 
+      # check full build artifacts licenses
+      - name: Check binary licenses
+        run: src/check-binary-license.sh 
./distribution/server/target/apache-pulsar-*-bin.tar.gz
+
       - name: Clean up disk space
         run: |
           # release disk space since saving docker image consumes local disk 
space
diff --git a/src/check-binary-license.sh b/src/check-binary-license.sh
index 64e5bd4320a..e3df9673a64 100755
--- a/src/check-binary-license.sh
+++ b/src/check-binary-license.sh
@@ -98,7 +98,7 @@ if [ "$NO_PRESTO" -ne 1 ]; then
   # check pulsar sql jars
   JARS=$(tar -tf $TARBALL | grep '\.jar' | grep 'trino/' | grep -v 
pulsar-client | grep -v bouncy-castle-bc | grep -v pulsar-metadata | grep -v 
'managed-ledger' | grep -v  'pulsar-client-admin' | grep -v  
'pulsar-client-api' | grep -v 'pulsar-functions-api' | grep -v 
'pulsar-presto-connector-original' | grep -v 'pulsar-presto-distribution' | 
grep -v 'pulsar-common' | grep -v 'pulsar-functions-proto' | grep -v 
'pulsar-functions-utils' | grep -v 'pulsar-io-core' | grep -v 'pulsar-transacti 
[...]
   if [ -n "$JARS" ]; then
-    LICENSEPATH=$(tar -tf $TARBALL  | awk '/^[^\/]*\/lib\/presto\/LICENSE/')
+    LICENSEPATH=$(tar -tf $TARBALL  | awk '/^[^\/]*\/trino\/LICENSE/')
     LICENSE=$(tar -O -xf $TARBALL "$LICENSEPATH")
     LICENSEJARS=$(echo "$LICENSE" | sed -nE 's!.* (.*\.jar).*!\1!gp')
 

Reply via email to