Skip to content

Commit 97b7948

Browse files
authored
chore: check binary file precisely in validate-release.yml (#194)
1 parent 88a0ea1 commit 97b7948

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/validate-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ jobs:
109109
COUNT=$(find . -type d -empty | wc -l)
110110
if [[ $COUNT -ne 0 ]]; then
111111
find . -type d -empty
112-
echo "The package should not include empty directory, but get $COUNT" # TODO: && exit 1
112+
echo "The package shouldn't include empty directory, but get $COUNT" # TODO: && exit 1
113113
fi
114114
115115
# 4.3 ensure any file should less than 900kb & not include binary file
116116
COUNT=$(find . -type f -size +900k | wc -l)
117117
if [[ $COUNT -ne 0 ]]; then
118118
find . -type f -size +900k
119-
echo "The package should not include file larger than 900kb, but get $COUNT"
119+
echo "The package shouldn't include file larger than 900kb, but get $COUNT"
120120
fi
121-
COUNT=$(find . -type f | perl -lne 'print if -B' | wc -l)
121+
COUNT=$(find . -type f | perl -lne 'print if -B' | grep -v *.txt | wc -l)
122122
if [[ $COUNT -ne 0 ]]; then
123123
find . -type f | perl -lne 'print if -B'
124-
echo "The package should not include binary file, but get $COUNT"
124+
echo "The package shouldn't include binary file, but get $COUNT"
125125
fi
126126
127127
# 4.4 test compile the packages

0 commit comments

Comments
 (0)