Merge pull request #124156 from bells17/support-mac-os-verify-file-size

[hack/verify-file-sizes.sh] Support Mac OS X
This commit is contained in:
Kubernetes Prow Robot
2024-04-19 15:31:04 -07:00
committed by GitHub

View File

@@ -42,7 +42,7 @@ largefiles () {
case "$tree" in case "$tree" in
w/-text) w/-text)
# Only binary files have a size limit. # Only binary files have a size limit.
size="$(stat --printf=%s "$file")" size="$(wc -c < "$file")"
if [ "${size}" -gt "$maxsize" ] && if [ "${size}" -gt "$maxsize" ] &&
! kube::util::array_contains "$file" "${allowlist[@]}"; then ! kube::util::array_contains "$file" "${allowlist[@]}"; then
echo "$file is too large ($size bytes)" echo "$file is too large ($size bytes)"