代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/LinDB 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
.PHONY: help build test deps generate clean
# use the latest git tag as release-version
GIT_TAG_NAME=$(shell git tag --sort=-creatordate|head -n 1)
BUILD_TIME=$(shell date "+%Y-%m-%dT%H:%M:%S%z")
ifeq ($(GIT_TAG_NAME),)
GIT_TAG_NAME := "unknown"
endif
LD_FLAGS=-ldflags="-X github.com/lindb/lindb/config.Version=$(GIT_TAG_NAME) -X github.com/lindb/lindb/config.BuildTime=$(BUILD_TIME)"
# Ref: https://gist.github.com/prwhite/8168133
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} \
/^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
build-frontend: ## build frontend
cd web/ && make web_build
GOARCH = amd64
build: clean-build build-frontend build-lind ## Build executable files.
build-all: clean-frontend-build build-frontend clean-build build-lind ## Build executable files with front-end files inside.
build-lind: ## build lindb binary
env GOOS=darwin GOARCH=$(GOARCH) go build -o 'bin/lind-darwin' $(LD_FLAGS) ./cmd/lind
env GOOS=linux GOARCH=$(GOARCH) go build -o 'bin/lind-linux' $(LD_FLAGS) ./cmd/lind
env GOOS=windows GOARCH=$(GOARCH) go build -o 'bin/lind-windows.exe' $(LD_FLAGS) ./cmd/lind
env GOOS=darwin GOARCH=$(GOARCH) go build -o 'bin/lindcli-darwin' $(LD_FLAGS) ./cmd/cli
env GOOS=linux GOARCH=$(GOARCH) go build -o 'bin/lindcli-linux' $(LD_FLAGS) ./cmd/cli
env GOOS=windows GOARCH=$(GOARCH) go build -o 'bin/lindcli-windows.exe' $(LD_FLAGS) ./cmd/cli
GOMOCK_VERSION = "v1.5.0"
gomock: ## go generate mock file.
go install "github.com/golang/mock/mockgen@$(GOMOCK_VERSION)"
go list ./... |grep -v '/gomock' | xargs go generate -v
header: ## check and add license header.
sh addlicense.sh
import: ## opt go imports format.
sh imports.sh
lint: ## run lint
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@v1.48.0"
golangci-lint run ./...
api-doc: ## generate api document
go install "github.com/swaggo/swag/cmd/swag@v1.5.0"
swag init -g pkg/http/doc.go
test-without-lint: ## Run test without lint
go install "github.com/rakyll/gotest@v0.0.6"
GIN_MODE=release
LOG_LEVEL=fatal ## disable log for test
gotest -v -race -coverprofile=coverage.out -covermode=atomic ./...
test: header lint test-without-lint ## Run test cases.
e2e-test:
go install "github.com/rakyll/gotest@v0.0.6"
GIN_MODE=release
LOG_LEVEL=fatal ## disable log for test
gotest -v --tags=integration -race -coverprofile=coverage.out -covermode=atomic ./e2e/...
e2e: header e2e-test
deps: ## Update vendor.
go mod verify
go mod tidy -v
generate: ## generate pb/tmpl file.
# go get github.com/benbjohnson/tmpl
go install github.com/benbjohnson/tmpl@latest
# brew install flatbuffers
sh ./proto/generate.sh
cd tsdb/template && sh generate_tmpl.sh
clean-mock: ## remove all mock files
find ./ -name "*_mock.go" | xargs rm
clean-build:
rm -f bin/lin*
clean-frontend-build:
cd web/ && make web_clean
clean-tmp: ## clean up tmp and test out files
find . -type f -name '*.out' -exec rm -f {} +
find . -type f -name '.DS_Store' -exec rm -f {} +
find . -type f -name '*.test' -exec rm -f {} +
find . -type f -name '*.prof' -exec rm -f {} +
find . -type s -name 'localhost:*' -exec rm -f {} +
find . -type s -name '127.0.0.1:*' -exec rm -f {} +
clean: clean-mock clean-tmp clean-build clean-frontend-build ## Clean up useless files.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。