From fd108942c48dc257ca2bc254cad56c43cf45d0c3 Mon Sep 17 00:00:00 2001 From: Yuxing Deng Date: Thu, 26 May 2022 15:53:15 +0800 Subject: [PATCH] fix(autok3s): skip compress darwin arm64 binary --- hack/lib/upx.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hack/lib/upx.sh b/hack/lib/upx.sh index 522b8592..db5a674b 100755 --- a/hack/lib/upx.sh +++ b/hack/lib/upx.sh @@ -14,6 +14,12 @@ function autok3s::upx::run() { fi autok3s::log::info "compressing binaries" - upx ${ROOT_DIR}/dist/autok3s_* + for file in `ls ${ROOT_DIR}/dist`; do + if [[ "$file" == "autok3s_darwin_arm64" ]]; then + autok3s::log::info "darwin arm64 binary doesn't work well with upx, skipping compressing this binary." + continue + fi + upx -1 ${ROOT_DIR}/dist/$file; + done }