代码拉取完成,页面将自动刷新
同步操作将从 infraboard/mcube 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
MCUBE_MAIN := "cmd/mcube/main.go"
PROTOC_GEN_GO_HTTP_MAIN = "cmd/protoc-gen-go-http/main.go"
PROJECT_NAME := "mcube"
PKG := "github.com/infraboard/$(PROJECT_NAME)"
MOD_DIR := $(shell go env GOMODCACHE)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/ | grep -v redis | grep -v broker | grep -v etcd | grep -v examples)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
.PHONY: all dep lint vet test test-coverage build clean
all: build
push: lint test build## git push
@git push -u gitee
@git push -u origin
@rm -f build/*
dep: ## Get the dependencies
@go mod download
lint: ## Lint Golang files
@golint -set_exit_status ${PKG_LIST}
install: ## install mcube cli
@go install ${PKG}/cmd/mcube
@go install ${PKG}/cmd/protoc-gen-go-http
@go install ${PKG}/cmd/protoc-gen-go-ext
vet: ## Run go vet
@go vet ${PKG_LIST}
test: ## Run unittests
@go test -short ${PKG_LIST}
test-coverage: ## Run tests with coverage
@go test -short -coverprofile cover.out -covermode=atomic ${PKG_LIST}
@cat cover.out >> coverage.txt
test-hg: ## test http gen
@protoc -I=. -I=${GOPATH}/src --go-http_out=. examples/http/hello.proto --go-http_opt=module="github.com/infraboard/mcube"
build: dep ## Build the binary file
@go build -o build/$(PROJECT_NAME) $(MCUBE_MAIN)
clean: ## Remove previous build
@rm -f build/*
codegen: # Init Service
@protoc -I=. -I${MOD_DIR} --go-ext_out=module=${PKG}:. cmd/protoc-gen-go-ext/extension/tag/*.proto
@protoc -I=. -I${MOD_DIR} --go-ext_out=module=${PKG}:. pb/*/*.proto
@go generate ./...
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。