mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 16:15:59 +08:00
feat: add copy
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
@@ -52,8 +52,15 @@ fi
|
||||
|
||||
cd $OPENIM_ROOT
|
||||
|
||||
# Execute 'make build'
|
||||
make build
|
||||
# CPU core number
|
||||
cpu_count=$(lscpu | grep -e '^CPU(s):' | awk '{print $2}')
|
||||
echo -e "${GREEN_PREFIX}======> cpu_count=$cpu_count${COLOR_SUFFIX}"
|
||||
|
||||
# Count the number of concurrent compilations (half the number of cpus)
|
||||
compile_count=$((cpu_count / 2))
|
||||
|
||||
# Execute 'make build' run the make command for concurrent compilation
|
||||
make -j$compile_count build
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "make build Error, script exits"
|
||||
|
||||
@@ -23,14 +23,14 @@ LICENSE_TEMPLATE ?= $(ROOT_DIR)/scripts/LICENSE/LICENSE_TEMPLATES
|
||||
.PHONY: copyright.verify
|
||||
copyright.verify: tools.verify.addlicense
|
||||
@echo "===========> Validate boilerplate headers for assign files starting in the $(ROOT_DIR) directory"
|
||||
@$(TOOLS_DIR)/addlicense -v -check -ignore **/test/** -f $(LICENSE_TEMPLATE) $(CODE_DIRS)
|
||||
@$(TOOLS_DIR)/addlicense -v -check -ignore **/test/** -ignore **pb** -f $(LICENSE_TEMPLATE) $(CODE_DIRS)
|
||||
@echo "===========> End of boilerplate headers check..."
|
||||
|
||||
## copyright.add: Add the boilerplate headers for all files
|
||||
.PHONY: copyright.add
|
||||
copyright.add: tools.verify.addlicense
|
||||
@echo "===========> Adding $(LICENSE_TEMPLATE) the boilerplate headers for all files"
|
||||
@$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -v -c "OpenIM." -f $(LICENSE_TEMPLATE) $(CODE_DIRS)
|
||||
@$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -ignore **pb** -v -c "OpenIM." -f $(LICENSE_TEMPLATE) $(CODE_DIRS)
|
||||
@echo "===========> End the copyright is added..."
|
||||
|
||||
# Addlicense Flags:
|
||||
|
||||
@@ -20,6 +20,34 @@
|
||||
# docker registry: registry.example.com/namespace/image:tag as: registry.hub.docker.com/cubxxw/<image-name>:<tag>
|
||||
#
|
||||
|
||||
# # If you wish built the manager image targeting other platforms you can use the --platform flag.
|
||||
# # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
|
||||
# # More info: https://docs.docker.com/develop/develop-images/build_enhancements/
|
||||
# .PHONY: docker-build
|
||||
# docker-build: test ## Build docker image with the manager.
|
||||
# docker build -t ${IMG} .
|
||||
|
||||
# .PHONY: docker-push
|
||||
# docker-push: ## Push docker image with the manager.
|
||||
# docker push ${IMG}
|
||||
|
||||
# # PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
|
||||
# # architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
|
||||
# # - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
|
||||
# # - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
|
||||
# # - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
|
||||
# # To properly provided solutions that supports more than one platform you should use this option.
|
||||
# PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
|
||||
# .PHONY: docker-buildx
|
||||
# docker-buildx: test ## Build and push docker image for the manager for cross-platform support
|
||||
# # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
|
||||
# sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
|
||||
# - docker buildx create --name project-v3-builder
|
||||
# docker buildx use project-v3-builder
|
||||
# - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
|
||||
# - docker buildx rm project-v3-builder
|
||||
# rm Dockerfile.cross
|
||||
|
||||
DOCKER := docker
|
||||
DOCKER_SUPPORTED_API_VERSION ?= 1.32|1.40|1.41
|
||||
|
||||
|
||||
Reference in New Issue
Block a user