fix: fix cmd filename

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/462/head
Xinwei Xiong(cubxxw-openim) 1 year ago
parent 12695337e9
commit aedd16a33a

@ -85,9 +85,9 @@ GOBIN=$(shell go env GOBIN)
endif
# The OS must be linux when building docker images
PLATFORMS ?= linux_amd64 linux_arm64
# PLATFORMS ?= linux_amd64 linux_arm64
# The OS can be linux/windows/darwin when building binaries
# PLATFORMS ?= darwin_amd64 windows_amd64 linux_amd64 linux_arm64
PLATFORMS ?= linux_s390x linux_mips64 linux_mips64le darwin_amd64 windows_amd64 linux_amd64 linux_arm64
# only support linux
GOOS=linux

@ -113,8 +113,8 @@ go.build.%:
@mkdir -p $(BIN_DIR)/platforms/$(OS)/$(ARCH)
@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 \
elif [ "$(COMMAND)" == "openim_rpc" ]; then \
for d in $(wildcard $(ROOT_DIR)/cmd/openim_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; \

Loading…
Cancel
Save