Skip to content

Commit

Permalink
Merge branch 'kosmos-io:main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gao12312 committed Sep 29, 2024
2 parents 7de5842 + 9679ed7 commit e443ba2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_output/release/kosmosctl-linux-amd64
_output/release/kosmosctl-linux-arm64
_output/release/kosmosctl-darwin-amd64
_output/release/kosmosctl-darwin-arm64
_output/release/kosmosctl/kosmosctl-linux-amd64
_output/release/kosmosctl/kosmosctl-linux-arm64
_output/release/kosmosctl/kosmosctl-darwin-amd64
_output/release/kosmosctl/kosmosctl-darwin-arm64
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 e443ba2

Please sign in to comment.