Unverified Commit f72d39ad authored by Brian Downs's avatar Brian Downs Committed by GitHub

add binary size check script, makefile target, and added to CI (#2209)

* add binary size check script, makefile target, and added to drone Signed-off-by: 's avatarBrian Downs <brian.downs@gmail.com> * move script call to package script Signed-off-by: 's avatarBrian Downs <brian.downs@gmail.com> * move script call to ci script Signed-off-by: 's avatarBrian Downs <brian.downs@gmail.com>
parent 49549230
......@@ -29,3 +29,7 @@ generate: build/data
build/data:
mkdir -p $@
.PHONY: binary-size-check
binary-size-check:
scripts/binary_size_check.sh
#!/bin/sh
set -e
if [ "${DEBUG}" = 1 ]; then
set -x
fi
MAX_BINARY_SIZE=61000000
SIZE=$(ls -l dist/artifacts/k3s | awk -F ' ' '{print $5}')
if [ ${SIZE} -gt ${MAX_BINARY_SIZE} ]; then
echo "k3s binary exceeds acceptable size of "${MAX_BINARY_SIZE}
exit 1
fi
exit 0
......@@ -7,5 +7,7 @@ cd $(dirname $0)
if [ -z "$SKIP_VALIDATE" ]; then
./validate
fi
./build
./package
./binary_size_check.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment