From dc318bbdb594ae5a8fddba7c6780a9861bbc2498 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Tue, 4 Jul 2023 10:14:18 +0800 Subject: [PATCH] cide: fix make file command Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- scripts/make-rules/golang.mk | 6 +++--- scripts/release.sh | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 scripts/release.sh diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 25939b090..255306062 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -114,9 +114,9 @@ go.build.%: @if [ "$(COMMAND)" == "openim-sdk-core" ]; then \ echo "===========> DEBUG: Compilation is not yet supported $(COMMAND)"; \ elif [ "$(COMMAND)" == "rpc" ]; then \ - for d in $(wildcard $(ROOT_DIR)/cmd/rpc/*/); do \ - cd $$d && CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o\ - $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$$(basename $$d)$(GO_OUT_EXT) .; \ + for d in $(wildcard $(ROOT_DIR)/cmd/rpc/*); do \ + cd $${d} && CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o \ + $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$$(basename $${d})$(GO_OUT_EXT) $${d}/main.go; \ done; \ else \ CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o \ diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100644 index 000000000..df4022cde --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Build a IAM release. This will build the binaries, create the Docker +# images and other build artifacts. + +set -o errexit +set -o nounset +set -o pipefail + +IAM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. +source "${IAM_ROOT}/scripts/common.sh" +source "${IAM_ROOT}/scripts/lib/release.sh" + +IAM_RELEASE_RUN_TESTS=${IAM_RELEASE_RUN_TESTS-y} + +iam::golang::setup_env +iam::build::verify_prereqs +iam::release::verify_prereqs +#iam::build::build_image +iam::build::build_command +iam::release::package_tarballs +iam::release::updload_tarballs +git push origin ${VERSION} +#iam::release::github_release +#iam::release::generate_changelog