From 582000b6990fcd5ffd7888d42a14baa4b74c394e Mon Sep 17 00:00:00 2001 From: duanmengkk Date: Sun, 29 Sep 2024 15:31:52 +0800 Subject: [PATCH] fix ci of release Signed-off-by: duanmengkk --- hack/release.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hack/release.sh b/hack/release.sh index 364ff41b9..381d9d99b 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -7,6 +7,8 @@ set -o pipefail REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${REPO_ROOT}/hack/util.sh" +VERSION=$4 + LDFLAGS="$(util::version_ldflags "$VERSION") ${LDFLAGS:-}" function release_binary() { @@ -27,12 +29,12 @@ function release_binary_for_platform() { local target_pkg="${KOSMOS_GO_PACKAGE}/$(util::get_target_source "$target")" set -x CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go build \ - -ldflags "${LDFLAGS:-}" \ - -o "_output/release/$target-${platform}" \ - "${target_pkg}" + -ldflags "${LDFLAGS:-}" \ + -o "_output/release/kosmosctl/$target-${platform}" \ + "${target_pkg}" # copy node-agent files - mkdir -p "_output/release/$target-${platform}/agent" - cp "${REPO_ROOT}/hack/node-agent"/* "_output/release/$target-${platform}/agent" + mkdir -p "_output/release/agent/$target-${platform}" + cp "${REPO_ROOT}/hack/node-agent"/* "_output/release/agent/$target-${platform}" set +x }