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

jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a758ba4 fix: double quotes to avoid spaces in grep for validating 
release (#310)
3a758ba4 is described below

commit 3a758ba49344ba503716e0fddcee9022c9d62755
Author: V_Galaxy <[email protected]>
AuthorDate: Sat Dec 23 20:56:18 2023 +0800

    fix: double quotes to avoid spaces in grep for validating release (#310)
---
 .github/workflows/validate-release.yml |  6 +++---
 dist/validate-release.sh               | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/validate-release.yml 
b/.github/workflows/validate-release.yml
index d2d90a22..221ace5d 100644
--- a/.github/workflows/validate-release.yml
+++ b/.github/workflows/validate-release.yml
@@ -123,14 +123,14 @@ jobs:
             fi
 
             # 4.3: ensure doesn't contains ASF CATEGORY X License dependencies 
in LICENSE and NOTICE files
-            COUNT=$(grep -E $CATEGORY_X LICENSE NOTICE | wc -l)
+            COUNT=$(grep -E "$CATEGORY_X" LICENSE NOTICE | wc -l)
             if [[ $COUNT -ne 0 ]]; then
               grep -E "$CATEGORY_X" LICENSE NOTICE
               echo "The package $i shouldn't include invalid ASF category X 
dependencies, but get $COUNT" && exit 1
             fi
           
             # 4.4: ensure doesn't contains ASF CATEGORY B License dependencies 
in LICENSE and NOTICE files
-            COUNT=$(grep -E $CATEGORY_B LICENSE NOTICE | wc -l)
+            COUNT=$(grep -E "$CATEGORY_B" LICENSE NOTICE | wc -l)
             if [[ $COUNT -ne 0 ]]; then
               grep -E "$CATEGORY_B" LICENSE NOTICE
               echo "The package $i shouldn't include invalid ASF category B 
dependencies, but get $COUNT" && exit 1
@@ -267,7 +267,7 @@ jobs:
             fi
 
             # 7.3: ensure doesn't contains ASF CATEGORY X License dependencies 
in LICENSE/NOTICE and licenses/* files
-            COUNT=$(grep -r -E $CATEGORY_X LICENSE NOTICE licenses | wc -l)
+            COUNT=$(grep -r -E "$CATEGORY_X" LICENSE NOTICE licenses | wc -l)
             if [[ $COUNT -ne 0 ]]; then
               grep -r -E "$CATEGORY_X" LICENSE NOTICE licenses
               echo "The package $i shouldn't include invalid ASF category X 
dependencies, but get $COUNT" && exit 1
diff --git a/dist/validate-release.sh b/dist/validate-release.sh
index 66706126..2181058c 100755
--- a/dist/validate-release.sh
+++ b/dist/validate-release.sh
@@ -105,14 +105,14 @@ for i in *src.tar.gz; do
   fi
 
   # 4.3: ensure doesn't contains ASF CATEGORY X License dependencies in 
LICENSE and NOTICE files
-  COUNT=$(grep -E $CATEGORY_X LICENSE NOTICE | wc -l)
+  COUNT=$(grep -E "$CATEGORY_X" LICENSE NOTICE | wc -l)
   if [[ $COUNT -ne 0 ]]; then
      grep -E "$CATEGORY_X" LICENSE NOTICE
      echo "The package $i shouldn't include invalid ASF category X 
dependencies, but get $COUNT" && exit 1
   fi
 
   # 4.4: ensure doesn't contains ASF CATEGORY B License dependencies in 
LICENSE and NOTICE files
-  COUNT=$(grep -E $CATEGORY_B LICENSE NOTICE | wc -l)
+  COUNT=$(grep -E "$CATEGORY_B" LICENSE NOTICE | wc -l)
   if [[ $COUNT -ne 0 ]]; then
      grep -E "$CATEGORY_B" LICENSE NOTICE
      echo "The package $i shouldn't include invalid ASF category B 
dependencies, but get $COUNT" && exit 1
@@ -211,8 +211,8 @@ bin/stop-hugegraph.sh || exit
 popd || exit
 
 # clear source packages
-rm -rf ./*src*
-ls -lh
+#rm -rf ./*src*
+#ls -lh
 
 ####################################
 # Step 7: Validate Binary Packages #
@@ -252,7 +252,7 @@ for i in *.tar.gz; do
   fi
 
   # 7.3: ensure doesn't contains ASF CATEGORY X License dependencies in 
LICENSE/NOTICE and licenses/* files
-  COUNT=$(grep -r -E $CATEGORY_X LICENSE NOTICE licenses | wc -l)
+  COUNT=$(grep -r -E "$CATEGORY_X" LICENSE NOTICE licenses | wc -l)
   if [[ $COUNT -ne 0 ]]; then
     grep -r -E "$CATEGORY_X" LICENSE NOTICE licenses
     echo "The package $i shouldn't include invalid ASF category X 
dependencies, but get $COUNT" && exit 1

Reply via email to