Skip to content

Commit

Permalink
use "-s -w" to strip the CLI binaries in task script
Browse files Browse the repository at this point in the history
  • Loading branch information
cfryanr committed Jan 23, 2025
1 parent a4d091c commit 0acd38f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipelines/shared-tasks/build-cli-binaries/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0acd38f

Please sign in to comment.