use "-s -w" to strip the CLI binaries in task script

This commit is contained in:
Ryan Richard
2025-01-22 16:29:52 -08:00
parent a4d091c857
commit 0acd38fa7d

View File

@@ -50,7 +50,7 @@ for target_os in "${target_os_list[@]}"; do
fi
# Cross-compile the executable binary (CGO_ENABLED=0 means static linking)
CGO_ENABLED=0 GOOS="$target_os" GOARCH="$target_platform" go build -trimpath -ldflags "$ldflags" -o "$output_dir" ./...
CGO_ENABLED=0 GOOS="$target_os" GOARCH="$target_platform" go build -trimpath -ldflags "-s -w $ldflags" -o "$output_dir" ./...
mv "${output_dir}/${name}" "../../../cli-binaries/${output}"
done