Skip to content

Commit

Permalink
Merge pull request #5369 from sylvestre/size
Browse files Browse the repository at this point in the history
Binary sizes: handle when 0 (relpath removal)
  • Loading branch information
cakebaker authored Oct 7, 2023
2 parents 992bbcc + 98cfb0c commit 91c8724
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,12 @@ jobs:
check() {
# Warn if the size increases by more than 5%
threshold='1.05'
if [[ "$2" -eq 0 || "$3" -eq 0 ]]; then
echo "::warning file=$4::Invalid size for $1. Sizes cannot be 0."
return
fi
ratio=$(jq -n "$2 / $3")
echo "$1: size=$2, previous_size=$3, ratio=$ratio, threshold=$threshold"
if [[ "$(jq -n "$ratio > $threshold")" == 'true' ]]; then
Expand Down

0 comments on commit 91c8724

Please sign in to comment.