-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
- Loading branch information
Showing
11 changed files
with
614 additions
and
147 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,6 +277,10 @@ copyright-add: tools.verify.addlicense | |
@$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -v -c "KubeCub open source community." -f $(LICENSE_TEMPLATE) $(CODE_DIRS) | ||
@echo "===========> End the copyright is added..." | ||
|
||
## tools: Install a must tools | ||
.PHONY: tools | ||
tools: $(addprefix tools.verify., $(BUILD_TOOLS)) | ||
|
||
## clean: Clean all builds. | ||
.PHONY: clean | ||
clean: | ||
|
@@ -302,47 +306,51 @@ tools.verify.%: | |
@if [ ! -f $(TOOLS_DIR)/$* ]; then GOBIN=$(TOOLS_DIR) $(MAKE) tools.install.$*; fi | ||
@echo "===========> $* is install in $(TOOLS_DIR)/$*" | ||
|
||
# tools: Install a must tools | ||
.PHONY: tools | ||
tools: $(addprefix tools.verify., $(BUILD_TOOLS)) | ||
|
||
# tools.install.%: Install a single tool in $GOBIN/ | ||
## tools.install.%: Install a single tool in $GOBIN/ | ||
.PHONY: tools.install.% | ||
tools.install.%: | ||
@echo "===========> Installing $,The default installation path is $(GOBIN)/$*" | ||
@$(MAKE) install.$* | ||
|
||
## install: Install all tools | ||
.PHONY: install.golangci-lint | ||
install.golangci-lint: | ||
@$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
|
||
## install.goimports: Install goimports, used to format go source files | ||
.PHONY: install.goimports | ||
install.goimports: | ||
@$(GO) install golang.org/x/tools/cmd/goimports@latest | ||
|
||
## install.addlicense: Install addlicense, used to add license header to source files | ||
.PHONY: install.addlicense | ||
install.addlicense: | ||
@$(GO) install github.com/google/addlicense@latest | ||
|
||
## install.deepcopy-gen: Install deepcopy-gen, used to generate deepcopy functions | ||
.PHONY: install.deepcopy-gen | ||
install.deepcopy-gen: | ||
@$(GO) install k8s.io/code-generator/cmd/deepcopy-gen@latest | ||
|
||
## install.conversion-gen: Install conversion-gen, used to generate conversion functions | ||
.PHONY: install.conversion-gen | ||
install.conversion-gen: | ||
@$(GO) install k8s.io/code-generator/cmd/conversion-gen@latest | ||
|
||
## install.ginkgo: Install ginkgo, used to run go tests | ||
.PHONY: install.ginkgo | ||
install.ginkgo: | ||
@$(GO) install github.com/onsi/ginkgo/[email protected] | ||
|
||
## install.go-junit-report: Install go-junit-report, used to generate junit report | ||
.PHONY: install.go-gitlint | ||
# wget -P _output/tools/ https://openim-1306374445.cos.ap-guangzhou.myqcloud.com/openim/tools/go-gitlint | ||
# go install github.com/antham/go-gitlint/cmd/gitlint@latest | ||
install.go-gitlint: | ||
@wget -q https://openim-1306374445.cos.ap-guangzhou.myqcloud.com/openim/tools/go-gitlint -O ${TOOLS_DIR}/go-gitlint | ||
@chmod +x ${TOOLS_DIR}/go-gitlint | ||
|
||
## install.go-junit-report: Install go-junit-report, used to generate junit report | ||
.PHONY: install.go-junit-report | ||
install.go-junit-report: | ||
@$(GO) install github.com/jstemmer/go-junit-report@latest | ||
|
@@ -446,6 +454,11 @@ install.cfssl: | |
install.depth: | ||
@$(GO) install github.com/KyleBanks/depth/cmd/depth@latest | ||
|
||
## install.ko: Install ko, used to build go program into container images | ||
.PHONY: install.ko | ||
install.ko: | ||
@$(GO) install github.com/google/ko@latest | ||
|
||
## install.go-callvis: Install go-callvis, used to visualize call graph | ||
.PHONY: install.go-callvis | ||
install.go-callvis: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 设置基础镜像 | ||
FROM golang | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
ENV GOPROXY=https://goproxy.cn | ||
|
||
COPY . /app/ | ||
|
||
RUN make build | ||
|
||
# 设置容器启动命令 | ||
CMD ["/app/_output/bin/platforms/linux/amd64/exporter --help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 设置基础镜像 | ||
FROM golang | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
ENV GOPROXY=https://goproxy.cn | ||
|
||
COPY . /app/ | ||
|
||
RUN make build | ||
|
||
# 设置容器启动命令 | ||
CMD ["/app/_output/bin/platforms/linux/amd64/syncer --help"] |
Oops, something went wrong.