Skip to content

Commit

Permalink
chore: check binary file precisely in validate-release.yml (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin authored Feb 8, 2023
1 parent 88a0ea1 commit 97b7948
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97b7948

Please sign in to comment.