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 }