Use `--apparent-size` in size check
This is why the size was variable - blocks can vary depending on file system.
@@ -341,18 +341,18 @@ function os::build::check_binaries() {
# enforce that certain binaries don't accidentally grow too large
# IMPORTANT: contact Clayton or another master team member before altering this code
if [[ -f "${OS_OUTPUT_BINPATH}/${platform}/oc" ]]; then
- ocsize=$(du -m "${OS_OUTPUT_BINPATH}/${platform}/oc" | cut -f 1)
- if [[ "${ocsize}" -gt "116" ]]; then
+ ocsize=$(du --apparent-size -m "${OS_OUTPUT_BINPATH}/${platform}/oc" | cut -f 1)
+ if [[ "${ocsize}" -gt "118" ]]; then
os::log::fatal "oc binary has grown substantially to ${ocsize}. You must have approval before bumping this limit."
fi
fi
if [[ -f "${OS_OUTPUT_BINPATH}/${platform}/openshift-node-config" ]]; then
- if [[ "$(du -m "${OS_OUTPUT_BINPATH}/${platform}/openshift-node-config" | cut -f 1)" -gt "22" ]]; then
+ if [[ "$(du --apparent-size -m "${OS_OUTPUT_BINPATH}/${platform}/openshift-node-config" | cut -f 1)" -gt "22" ]]; then
os::log::fatal "openshift-node-config binary has grown substantially. You must have approval before bumping this limit."
fi
fi
if [[ -f "${OS_OUTPUT_BINPATH}/${platform}/pod" ]]; then
- if [[ "$(du -m "${OS_OUTPUT_BINPATH}/${platform}/pod" | cut -f 1)" -gt "2" ]]; then
+ if [[ "$(du --apparent-size -m "${OS_OUTPUT_BINPATH}/${platform}/pod" | cut -f 1)" -gt "2" ]]; then
os::log::fatal "pod binary has grown substantially. You must have approval before bumping this limit."
fi
fi
