fix: binary name modification

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-07-07 19:45:32 +08:00
parent d6a89567e5
commit 3e7989c2e7
48 changed files with 141 additions and 1471 deletions
+14 -14
View File
@@ -33,20 +33,20 @@ readonly OPENIM_SUPPORTED_CLIENT_PLATFORMS=(
# If you update this list, please also update build/BUILD.
openim::golang::server_targets() {
local targets=(
openim_api
openim_cmdutils
openim_cmdutils
openim_crontask
openim_msggateway
openim_msgtransfer
openim_push
openim_rpc_auth
openim_rpc_conversation
openim_rpc_friend
openim_rpc_group
openim_rpc_msg
openim_rpc_third
openim_rpc_user
openim-api
openim-cmdutils
openim-cmdutils
openim-crontask
openim-msggateway
openim-msgtransfer
openim-push
openim-rpc-auth
openim-rpc-conversation
openim-rpc-friend
openim-rpc-group
openim-rpc-msg
openim-rpc-third
openim-rpc-user
)
echo "${targets[@]}"
}
+12 -12
View File
@@ -407,18 +407,18 @@ function openim::release::package_iam_manifests_tarball() {
mkdir -p "${dst_dir}"
cp -r ${src_dir}/* "${dst_dir}"
#cp "${src_dir}/openim-api.yaml" "${dst_dir}"
#cp "${src_dir}/openim_cmdutils.yaml" "${dst_dir}"
#cp "${src_dir}/openim_crontask.yaml" "${dst_dir}"
#cp "${src_dir}/openim_msggateway.yaml" "${dst_dir}"
#cp "${src_dir}/openim_msgtransfer.yaml" "${dst_dir}"
#cp "${src_dir}/openim_push.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_auth.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_conversation.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_friend.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_group.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_msg.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_third.yaml" "${dst_dir}"
#cp "${src_dir}/openim_rpc_user.yaml" "${dst_dir}"
#cp "${src_dir}/openim-cmdutils.yaml" "${dst_dir}"
#cp "${src_dir}/openim-crontask.yaml" "${dst_dir}"
#cp "${src_dir}/openim-msggateway.yaml" "${dst_dir}"
#cp "${src_dir}/openim-msgtransfer.yaml" "${dst_dir}"
#cp "${src_dir}/openim-push.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-auth.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-conversation.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-friend.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-group.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-msg.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-third.yaml" "${dst_dir}"
#cp "${src_dir}/openim-rpc-user.yaml" "${dst_dir}"
#cp "${OPENIM_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
openim::release::clean_cruft
+26 -26
View File
@@ -233,35 +233,35 @@ openim::util::gen-docs() {
"${gendocs}" "${dest}/docs/guide/en-US/cmd/imctl/"
mkdir -p "${dest}/docs/guide/en-US/cmd/"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_api"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_cmdutils"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_crontask"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_msggateway"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_msgtransfer"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_push"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_auth"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_conversation"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_friend"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_group"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_msg"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_third"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim_rpc_user"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-api"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-cmdutils"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-crontask"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-msggateway"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-msgtransfer"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-push"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-auth"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-conversation"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-friend"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-group"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-msg"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-third"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-rpc-user"
"${geniamdocs}" "${dest}/docs/guide/en-US/cmd/imctl" "imctl"
mkdir -p "${dest}/docs/man/man1/"
"${genman}" "${dest}/docs/man/man1/" "openim_api"
"${genman}" "${dest}/docs/man/man1/" "openim_cmdutils"
"${genman}" "${dest}/docs/man/man1/" "openim_crontask"
"${genman}" "${dest}/docs/man/man1/" "openim_msggateway"
"${genman}" "${dest}/docs/man/man1/" "openim_msgtransfer"
"${genman}" "${dest}/docs/man/man1/" "openim_push"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_auth"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_conversation"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_friend"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_group"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_msg"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_third"
"${genman}" "${dest}/docs/man/man1/" "openim_rpc_user"
"${genman}" "${dest}/docs/man/man1/" "openim-api"
"${genman}" "${dest}/docs/man/man1/" "openim-cmdutils"
"${genman}" "${dest}/docs/man/man1/" "openim-crontask"
"${genman}" "${dest}/docs/man/man1/" "openim-msggateway"
"${genman}" "${dest}/docs/man/man1/" "openim-msgtransfer"
"${genman}" "${dest}/docs/man/man1/" "openim-push"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-auth"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-conversation"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-friend"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-group"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-msg"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-third"
"${genman}" "${dest}/docs/man/man1/" "openim-rpc-user"
mkdir -p "${dest}/docs/guide/en-US/yaml/imctl/"
"${genyaml}" "${dest}/docs/guide/en-US/yaml/imct/"
+3 -3
View File
@@ -147,18 +147,18 @@ endef
# Here are some examples of builds
define MAKEFILE_EXAMPLE
# make build BINS=openim_api Only a single openim_api binary is built.
# make build BINS=openim-api Only a single openim-api binary is built.
# make -j (nproc) all Run tidy gen add-copyright format lint cover build concurrently.
# make gen Generate all necessary files.
# make release Build release binaries for all platforms.
# make verify-copyright Verify the license headers for all files.
# make install-deepcopy-gen Install deepcopy-gen tools if the license is missing.
# make build BINS=openim_api V=1 DEBUG=1 Build debug binaries for only openim_api.
# make build BINS=openim-api V=1 DEBUG=1 Build debug binaries for only openim-api.
# make multiarch -j PLATFORMS="linux_arm64 linux_amd64" V=1 Build binaries for both platforms.
endef
export MAKEFILE_EXAMPLE
# Define all help functions @printf "\n\033[1mCurrent openim_api version information: $(shell openim_api version):\033[0m\n\n"
# Define all help functions @printf "\n\033[1mCurrent openim-api version information: $(shell openim-api version):\033[0m\n\n"
define makeallhelp
@printf "\n\033[1mMake example:\033[0m\n\n"
$(call MAKEFILE_EXAMPLE)
+3 -3
View File
@@ -71,20 +71,20 @@ EXCLUDE_TESTS=github.com/OpenIMSDK/Open-IM-Server/test github.com/OpenIMSDK/Open
# tree -L 1 cmd
# cmd
# ├── openim-sdk-core/ - main.go
# ├── openim_api
# ├── openim-api
# ├── openim_cms_api
# ├── openim_cron_task
# ├── openim_demo
# ├── openim_msg_gateway
# ├── openim_msg_transfer
# ├── openim_push
# ├── openim-push
# ├── rpc/openim_admin_cms/ - main.go
# └── test/ - main.go
# COMMAND=openim
# PLATFORM=linux_amd64
# OS=linux
# ARCH=amd64
# BINS=openim_api openim_cms_api openim_cron_task openim_demo openim_msg_gateway openim_msg_transfer openim_push
# BINS=openim-api openim_cms_api openim_cron_task openim_demo openim_msg_gateway openim_msg_transfer openim-push
# BIN_DIR=/root/workspaces/OpenIM/_output/bin
# ==============================================================================
+73 -69
View File
@@ -1,92 +1,96 @@
#Don't put the space between "="
msg_gateway_name="openim_msg_gateway"
msg_gateway_binary_root="../bin/"
# Determine the architecture and version
architecture=$(uname -m)
version=$(uname -s | tr '[:upper:]' '[:lower:]')
# Define the supported architectures and corresponding bin directories
declare -A supported_architectures=(
["linux-amd64"]="_output/bin/platforms/linux/amd64"
["linux-arm64"]="_output/bin/platforms/linux/arm64"
["linux-mips64"]="_output/bin/platforms/linux/mips64"
["linux-mips64le"]="_output/bin/platforms/linux/mips64le"
["linux-ppc64le"]="_output/bin/platforms/linux/ppc64le"
["linux-s390x"]="_output/bin/platforms/linux/s390x"
["darwin-amd64"]="_output/bin/platforms/darwin/amd64"
["windows-amd64"]="_output/bin/platforms/windows/amd64"
["linux-x86_64"]="_output/bin/platforms/linux/amd64" # Alias for linux-amd64
["darwin-x86_64"]="_output/bin/platforms/darwin/amd64" # Alias for darwin-amd64
)
# Check if the architecture and version are supported
if [[ -z ${supported_architectures["$version-$architecture"]} ]]; then
echo "Unsupported architecture: $architecture or version: $version"
exit 1
fi
# Set the BIN_DIR based on the architecture and version
BIN_DIR=${supported_architectures["$version-$architecture"]}
echo "BIN_DIR: $BIN_DIR"
# Don't put the space between "="
msg_gateway_name="openim-msggateway"
msg_gateway_binary_root= $BIN_DIR
msg_gateway_source_root="../cmd/msggateway/"
msg_name="openim_msg"
msg_binary_root="../bin/"
msg_binary_root=$BIN_DIR
msg_source_root="../cmd/rpc/msg/"
push_name="openim_push"
push_binary_root="../bin/"
push_name="openim-push"
push_binary_root=$BIN_DIR
push_source_root="../cmd/push/"
msg_transfer_name="openim_msg_transfer"
msg_transfer_binary_root="../bin/"
msg_transfer_binary_root=$BIN_DIR
msg_transfer_source_root="../cmd/msgtransfer/"
msg_transfer_service_num=4
sdk_server_name="openim_sdk_server"
sdk_server_binary_root="../bin/"
sdk_server_source_root="../cmd/Open-IM-SDK-Core/"
cron_task_name="openim_cron_task"
cron_task_binary_root="../bin/"
cron_task_binary_root=$BIN_DIR
cron_task_source_root="../cmd/crontask/"
cmd_utils_name="openim_cmd_utils"
cmd_utils_binary_root="../bin/"
cmd_utils_binary_root=$BIN_DIR
cmd_utils_source_root="../cmd/cmduitls/"
#Global configuration file default dir
# Global configuration file default dir
config_path="../config/config.yaml"
#servicefile dir path
# servicefile dir path
service_source_root=(
#api service file
../cmd/api/
#rpc service file
../cmd/rpc/user/
../cmd/rpc/friend/
../cmd/rpc/group/
../cmd/rpc/auth/
../cmd/rpc/conversation/
../cmd/rpc/third/
../cmd/crontask
${msg_gateway_source_root}
${msg_transfer_source_root}
${msg_source_root}
${push_source_root}
# ${sdk_server_source_root}
)
#service filename
service_names=(
#api service filename
openim_api
#rpc service filename
openim_user
openim_friend
openim_group
openim_auth
openim_conversation
openim_third
openim_cron_task
${msg_gateway_name}
${msg_transfer_name}
${msg_name}
${push_name}
# ${sdk_server_name}
# api service file
"../cmd/api/"
# rpc service file
"../cmd/rpc/user/"
"../cmd/rpc/friend/"
"../cmd/rpc/group/"
"../cmd/rpc/auth/"
"../cmd/rpc/conversation/"
"../cmd/rpc/third/"
"../cmd/crontask"
"${msg_gateway_source_root}"
"${msg_transfer_source_root}"
"${msg_source_root}"
"${push_source_root}"
# "${sdk_server_source_root}"
)
image_names=(
#api service file
api
#rpc service file
user
friend
group
auth
conversation
third
cron_task
msg_gateway
msg_transfer
msg
push
# sdk_server
)
# service filename
service_names=(
# api service filename
"openim-api"
# rpc service filename
"openim_user"
"openim_friend"
"openim_group"
"openim_auth"
"openim_conversation"
"openim_third"
"openim_cron_task"
"${msg_gateway_name}"
"${msg_transfer_name}"
"${msg_name}"
"${push_name}"
# "${sdk_server_name}"
)
+1 -1
View File
@@ -21,7 +21,7 @@ source ./function.sh
#service filename
service_filename=(
#api
openim_api
openim-api
#rpc
openim_user
openim_friend