From 826c86907cc4bde6a21c4ef7fc7af96517021bcb Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Sun, 9 Jul 2023 17:12:16 +0800 Subject: [PATCH] feat: complete the basic build Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .gitignore | 2 +- cmd/openim-msgtransfer/Makefile | 2 +- cmd/openim-msgtransfer/deploy.Dockerfile | 4 ++-- scripts/make-rules/golang.mk | 4 ++-- scripts/path_info.sh | 8 ++++---- scripts/start_rpc_service.sh | 1 + 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index a547540a7..6e29bad2c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ _output/ deploy/openim_demo deploy/openim-api deploy/openim-rpc-msg_gateway -deploy/openim-rpc-msg_transfer +deploy/openim-msgtransfer deploy/openim-push deploy/openim_timer_task deploy/openim-rpc-user diff --git a/cmd/openim-msgtransfer/Makefile b/cmd/openim-msgtransfer/Makefile index 9d4aa7dec..e2d058f6d 100644 --- a/cmd/openim-msgtransfer/Makefile +++ b/cmd/openim-msgtransfer/Makefile @@ -1,6 +1,6 @@ .PHONY: all build run gotool install clean help -NAME=openim-rpc-msg_transfer +NAME=openim-msgtransfer BIN_DIR=../../bin/ OS:= $(or $(os),linux) diff --git a/cmd/openim-msgtransfer/deploy.Dockerfile b/cmd/openim-msgtransfer/deploy.Dockerfile index 747b7f422..78f1f955c 100644 --- a/cmd/openim-msgtransfer/deploy.Dockerfile +++ b/cmd/openim-msgtransfer/deploy.Dockerfile @@ -25,8 +25,8 @@ RUN apt-get install -y vim curl tzdata gawk RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata RUN apt-get -qq update \ && apt-get -qq install -y --no-install-recommends ca-certificates curl -COPY ./openim-rpc-msg_transfer ./ +COPY ./openim-msgtransfer ./ VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"] -CMD ["./openim-rpc-msg_transfer","--prometheus_port", "21400"] +CMD ["./openim-msgtransfer","--prometheus_port", "21400"] diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 1b6c92ed3..2a6fd7f0d 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -76,7 +76,7 @@ EXCLUDE_TESTS=github.com/OpenIMSDK/Open-IM-Server/test github.com/OpenIMSDK/Open # ├── openim-crontask # ├── openim_demo # ├── openim-rpc-msg_gateway -# ├── openim-rpc-msg_transfer +# ├── openim-msgtransfer # ├── openim-push # ├── rpc/openim_admin_cms/ - main.go # └── test/ - main.go @@ -84,7 +84,7 @@ EXCLUDE_TESTS=github.com/OpenIMSDK/Open-IM-Server/test github.com/OpenIMSDK/Open # PLATFORM=linux_amd64 # OS=linux # ARCH=amd64 -# BINS=openim-api openim_cms_api openim-crontask openim_demo openim-rpc-msg_gateway openim-rpc-msg_transfer openim-push +# BINS=openim-api openim_cms_api openim-crontask openim_demo openim-rpc-msg_gateway openim-msgtransfer openim-push # BIN_DIR=/root/workspaces/OpenIM/_output/bin # ============================================================================== diff --git a/scripts/path_info.sh b/scripts/path_info.sh index 0edc0b5b2..ab6f2b2df 100755 --- a/scripts/path_info.sh +++ b/scripts/path_info.sh @@ -42,17 +42,17 @@ echo "================> BIN_DIR: $OPENIM_ROOT/$BIN_DIR" # Don't put the space between "=" openim_msggateway="openim-msggateway" msg_gateway_binary_root="$OPENIM_ROOT/$BIN_DIR" -msg_gateway_source_root="$OPENIM_ROOT/cmd/msggateway/" +msg_gateway_source_root="$OPENIM_ROOT/cmd/openim-msggateway/" msg_name="openim-rpc-msg" msg_binary_root="$OPENIM_ROOT/$BIN_DIR" -msg_source_root="$OPENIM_ROOT/cmd/openim-rpc/msg/" +msg_source_root="$OPENIM_ROOT/cmd/openim-rpc/openim-rpc-msg/" push_name="openim-push" push_binary_root="$OPENIM_ROOT/$BIN_DIR" -push_source_root="$OPENIM_ROOT/cmd/push/" +push_source_root="$OPENIM_ROOT/cmd/openim-push/" -openim_msgtransfer="openim-rpc-msg_transfer" +openim_msgtransfer="openim-msgtransfer" msg_transfer_binary_root="$OPENIM_ROOT/$BIN_DIR" msg_transfer_source_root="$OPENIM_ROOT/cmd/openim-msgtransfer/" msg_transfer_service_num=4 diff --git a/scripts/start_rpc_service.sh b/scripts/start_rpc_service.sh index 1cafd2b1c..132afdfe5 100755 --- a/scripts/start_rpc_service.sh +++ b/scripts/start_rpc_service.sh @@ -20,6 +20,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $SCRIPTS_ROOT/style_info.sh source $SCRIPTS_ROOT/path_info.sh +source $SCRIPTS_ROOT/function.sh cd $SCRIPTS_ROOT