mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 20:59:30 +00:00
* add binary size check script, makefile target, and added to drone Signed-off-by: Brian Downs <brian.downs@gmail.com> * move script call to package script Signed-off-by: Brian Downs <brian.downs@gmail.com> * move script call to ci script Signed-off-by: Brian Downs <brian.downs@gmail.com>
18 lines
281 B
Bash
Executable File
18 lines
281 B
Bash
Executable File
#!/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
|