Skip to content

Commit

Permalink
fix: double quotes to avoid spaces in grep for validating release (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies authored Dec 23, 2023
1 parent 70754d3 commit 3a758ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions dist/validate-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 #
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3a758ba

Please sign in to comment.