mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-07 19:50:07 +08:00
scripts fix change scripts to script, and create dependencies
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
parent
c85bbe0488
commit
b613a045d5
14
Makefile
14
Makefile
@ -23,13 +23,13 @@ VERSION_PACKAGE=github.com/OpenIMSDK/Open-IM-Server/pkg/version
|
||||
# ==============================================================================
|
||||
# Includes
|
||||
|
||||
include scripts/make-rules/common.mk # make sure include common.mk at the first include line
|
||||
include scripts/make-rules/golang.mk
|
||||
include scripts/make-rules/image.mk
|
||||
include scripts/make-rules/copyright.mk
|
||||
include scripts/make-rules/gen.mk
|
||||
include scripts/make-rules/dependencies.mk
|
||||
include scripts/make-rules/tools.mk
|
||||
include script/make-rules/common.mk # make sure include common.mk at the first include line
|
||||
include script/make-rules/golang.mk
|
||||
include script/make-rules/image.mk
|
||||
include script/make-rules/copyright.mk
|
||||
include script/make-rules/gen.mk
|
||||
include script/make-rules/dependencies.mk
|
||||
include script/make-rules/tools.mk
|
||||
|
||||
# ==============================================================================
|
||||
# Usage
|
||||
|
@ -138,7 +138,7 @@ all services build success
|
||||
|
||||
### SCRIPT DESCRIPTION
|
||||
|
||||
> Open-IM script provides service compilation, start, and stop scripts. There are four Open-IM script start modules, one is the http+rpc service start module, the second is the websocket service start module, then the msg_transfer module, and the last is the push module
|
||||
> Open-IM script provides service compilation, start, and stop script. There are four Open-IM script start modules, one is the http+rpc service start module, the second is the websocket service start module, then the msg_transfer module, and the last is the push module
|
||||
|
||||
- path_info.cfg&&style_info.cfg&&functions.sh
|
||||
- Contains the path information of each module, including the path where the source code is located, the name of the service startup, the shell print font style, and some functions for processing shell strings
|
||||
|
@ -30,7 +30,7 @@ RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure
|
||||
#set directory to map logs,config file,script file.
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script","/Open-IM-Server/db/sdk"]
|
||||
|
||||
#Copy scripts files and binary files to the blank image
|
||||
#Copy script files and binary files to the blank image
|
||||
COPY --from=build /Open-IM-Server/script /Open-IM-Server/script
|
||||
COPY --from=build /Open-IM-Server/bin /Open-IM-Server/bin
|
||||
|
||||
|
@ -38,7 +38,7 @@ define MAKEFILE_EXAMPLE
|
||||
# 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=imctl V=1 DEBUG=1 Build debug binaries for only imctl.
|
||||
# make build.multiarch PLATFORMS="linux_arm64 linux_amd64" V=1 Build binaries for both platforms.
|
||||
# make multiarch PLATFORMS="linux_arm64 linux_amd64" V=1 Build binaries for both platforms.
|
||||
endef
|
||||
export MAKEFILE_EXAMPLE
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# Makefile helper functions for copyright
|
||||
#
|
||||
|
||||
LICENSE_TEMPLATE ?= $(ROOT_DIR)/scripts/LICENSE_TEMPLATE
|
||||
LICENSE_TEMPLATE ?= $(ROOT_DIR)/script/LICENSE_TEMPLATE
|
||||
|
||||
# TODO: GOBIN -> TOOLS_DIR
|
||||
# Questions about go mod instead of go path: https://github.com/kubernetes/kubernetes/issues/117181
|
||||
@ -55,5 +55,5 @@ copyright.add: tools.verify.addlicense
|
||||
|
||||
## copyright.help: Show copyright help
|
||||
.PHONY: copyright.help
|
||||
copyright.help: scripts/make-rules/copyright.mk
|
||||
copyright.help: script/make-rules/copyright.mk
|
||||
$(call smallhelp)
|
36
script/make-rules/dependencies.mk
Normal file
36
script/make-rules/dependencies.mk
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright © 2023 OpenIMSDK.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ==============================================================================
|
||||
# Makefile helper functions for dependencies
|
||||
#
|
||||
|
||||
.PHONY: dependencies.run
|
||||
dependencies.run: dependencies.packages dependencies.tools
|
||||
|
||||
.PHONY: dependencies.packages
|
||||
dependencies.packages:
|
||||
@$(GO) mod tidy
|
||||
|
||||
.PHONY: dependencies.tools
|
||||
dependencies.tools: dependencies.tools.blocker dependencies.tools.critical
|
||||
|
||||
.PHONY: dependencies.tools.blocker
|
||||
dependencies.tools.blocker: go.build.verify $(addprefix tools.verify., $(BLOCKER_TOOLS))
|
||||
|
||||
.PHONY: dependencies.tools.critical
|
||||
dependencies.tools.critical: $(addprefix tools.verify., $(CRITICAL_TOOLS))
|
||||
|
||||
.PHONY: dependencies.tools.trivial
|
||||
dependencies.tools.trivial: $(addprefix tools.verify., $(TRIVIAL_TOOLS))
|
@ -17,3 +17,9 @@
|
||||
# https://cloud.redhat.com/blog/kubernetes-deep-dive-code-generation-customresources
|
||||
# ! The stock of code generated by `make gen` should be idempotent
|
||||
#
|
||||
|
||||
|
||||
## gen.help: show help for gen
|
||||
.PHONY: gen.help
|
||||
gen.help: script/make-rules/gen.mk
|
||||
$(call smallhelp)
|
@ -15,3 +15,9 @@
|
||||
# ==============================================================================
|
||||
# Build management helpers. These functions help to set, save and load the
|
||||
#
|
||||
|
||||
|
||||
## copyright.help: Show copyright help
|
||||
.PHONY: go.help
|
||||
go.help: script/make-rules/golang.mk
|
||||
$(call smallhelp)
|
||||
|
@ -16,6 +16,12 @@
|
||||
# Makefile helper functions for docker image
|
||||
# TODO: For the time being only used for compilation, it can be arm or amd, please do not delete it, it can be extended with new functions
|
||||
# ==============================================================================
|
||||
# Path: scripts/make-rules/image.mk
|
||||
# Path: script/make-rules/image.mk
|
||||
# docker registry: registry.example.com/namespace/image:tag as: registry.hub.docker.com/cubxxw/<image-name>:<tag>
|
||||
#
|
||||
|
||||
|
||||
## image.help: Print help for image targets
|
||||
.PHONY: image.help
|
||||
image.help: script/make-rules/image.mk
|
||||
$(call smallhelp)
|
@ -132,9 +132,9 @@ install.github-release:
|
||||
## install.gvm: Install gvm, gvm is a Go version manager, built on top of the official go tool.
|
||||
.PHONY: install.gvm
|
||||
install.gvm:
|
||||
@echo "===========> Installing gvm,The default installation path is ~/.gvm/scripts/gvm"
|
||||
@echo "===========> Installing gvm,The default installation path is ~/.gvm/script/gvm"
|
||||
@bash < <(curl -s -S -L https://raw.gitee.com/moovweb/gvm/master/binscripts/gvm-installer)
|
||||
@$(shell source /root/.gvm/scripts/gvm)
|
||||
@$(shell source /root/.gvm/script/gvm)
|
||||
|
||||
## install.golines: Install golines, used to format long lines
|
||||
.PHONY: install.golines
|
||||
@ -164,7 +164,7 @@ install.protoc-gen-go:
|
||||
## install.cfssl: Install cfssl, used to generate certificates
|
||||
.PHONY: install.cfssl
|
||||
install.cfssl:
|
||||
@$(ROOT_DIR)/scripts/install/install.sh iam::install::install_cfssl
|
||||
@$(ROOT_DIR)/script/install/install.sh iam::install::install_cfssl
|
||||
|
||||
## install.depth: Install depth, used to check dependency tree
|
||||
.PHONY: install.depth
|
||||
@ -198,5 +198,5 @@ install.codegen:
|
||||
|
||||
## tools.help: Display help information about the tools package
|
||||
.PHONY: tools.help
|
||||
tools.help: scripts/make-rules/tools.mk
|
||||
tools.help: script/make-rules/tools.mk
|
||||
$(call smallhelp)
|
Loading…
x
Reference in New Issue
Block a user