Skip to content

Commit

Permalink
fix ci of release
Browse files Browse the repository at this point in the history
Signed-off-by: duanmengkk <[email protected]>
  • Loading branch information
duanmengkk committed Sep 29, 2024
1 parent afb3cab commit 582000b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
}

Expand Down

0 comments on commit 582000b

Please sign in to comment.