From 97b7948a9f4c395ddaaa3fe9c5443b0da1005a20 Mon Sep 17 00:00:00 2001 From: imbajin Date: Wed, 8 Feb 2023 21:55:17 +0800 Subject: [PATCH] chore: check binary file precisely in validate-release.yml (#194) --- .github/workflows/validate-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate-release.yml b/.github/workflows/validate-release.yml index 3c47cd85b..a45429e88 100644 --- a/.github/workflows/validate-release.yml +++ b/.github/workflows/validate-release.yml @@ -109,19 +109,19 @@ jobs: COUNT=$(find . -type d -empty | wc -l) if [[ $COUNT -ne 0 ]]; then find . -type d -empty - echo "The package should not include empty directory, but get $COUNT" # TODO: && exit 1 + echo "The package shouldn't include empty directory, but get $COUNT" # TODO: && exit 1 fi # 4.3 ensure any file should less than 900kb & not include binary file COUNT=$(find . -type f -size +900k | wc -l) if [[ $COUNT -ne 0 ]]; then find . -type f -size +900k - echo "The package should not include file larger than 900kb, but get $COUNT" + echo "The package shouldn't include file larger than 900kb, but get $COUNT" fi - COUNT=$(find . -type f | perl -lne 'print if -B' | wc -l) + COUNT=$(find . -type f | perl -lne 'print if -B' | grep -v *.txt | wc -l) if [[ $COUNT -ne 0 ]]; then find . -type f | perl -lne 'print if -B' - echo "The package should not include binary file, but get $COUNT" + echo "The package shouldn't include binary file, but get $COUNT" fi # 4.4 test compile the packages