Skip to content

Commit

Permalink
feat: Reduce the size of the node agent image
Browse files Browse the repository at this point in the history
Signed-off-by: baoyinghai_yewu <[email protected]>
  • Loading branch information
OrangeBao committed Dec 25, 2024
1 parent 7daed75 commit a145b6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ function build_binary_for_platform() {
-ldflags "${LDFLAGS:-}" \
-o "_output/bin/${platform}/$target" \
"${target_pkg}"
# copy file
echo "${REPO_ROOT}/hack/node-agent" "_output/bin/${platform}/$target"
mkdir -p "_output/bin/${platform}/agent"
cp "${REPO_ROOT}/hack/node-agent"/* "_output/bin/${platform}/agent"
cp "_output/bin/${platform}/$target" "_output/bin/${platform}/agent"
cd "_output/bin/${platform}" && tar -czvf "agent.tar.gz" "agent"
# copy file for node-agent
if [[ "${target}" == "node-agent" ]]; then
echo "${REPO_ROOT}/hack/node-agent" "_output/bin/${platform}/$target"
mkdir -p "_output/bin/${platform}/agent"
cp "${REPO_ROOT}/hack/node-agent"/* "_output/bin/${platform}/agent"
cp "_output/bin/${platform}/$target" "_output/bin/${platform}/agent"
cd "_output/bin/${platform}" && tar -czvf "agent.tar.gz" "agent"
fi
set +x
}

Expand Down
Empty file modified hack/clean.sh
100644 → 100755
Empty file.

0 comments on commit a145b6f

Please sign in to comment.