1 Star 0 Fork 13

老江 / backup-db

forked from Gitee 极速下载 / backup-db 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 617 Bytes
一键复制 编辑 原始数据 按行查看 历史
.PHONY: build clean test test-race
VERSION=v2.0.0
BIN=backup-db
DIR_SRC=.
DOCKER_CMD=docker
GO_ENV=CGO_ENABLED=0
GO_FLAGS=-ldflags="-X main.version=$(VERSION) -X 'main.buildTime=`date`' -extldflags -static"
GO=$(GO_ENV) $(shell which go)
GOROOT=$(shell `which go` env GOROOT)
GOPATH=$(shell `which go` env GOPATH)
build: $(DIR_SRC)/main.go
@$(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)
build_image:
@$(DOCKER_CMD) build -f ./Dockerfile -t backup-db:$(VERSION) .
test:
@$(GO) test ./...
test-race:
@$(GO) test -race ./...
# clean all build result
clean:
@$(GO) clean ./...
@rm -f $(BIN)
@rm -rf ./dist/*
1
https://gitee.com/ahrz/backup-db.git
git@gitee.com:ahrz/backup-db.git
ahrz
backup-db
backup-db
master

搜索帮助