forked from xelabs/go-mydumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
42 lines (34 loc) · 883 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
export GOPATH := $(shell pwd)
export PATH := $(GOPATH)/bin:$(PATH)
all: get build test
get:
@echo "--> go get..."
go get github.com/XeLabs/go-mysqlstack/driver
go get github.com/stretchr/testify/assert
go get github.com/pierrre/gotestcover
build:
@echo "--> Building..."
go build -v -o bin/mydumper src/mydumper/main.go
go build -v -o bin/myloader src/myloader/main.go
go build -v -o bin/mystreamer src/mystreamer/main.go
@chmod 755 bin/*
clean:
@echo "--> Cleaning..."
@go clean
@rm -f bin/*
fmt:
go fmt ./...
go vet ./...
test:
@echo "--> Testing..."
@$(MAKE) testcommon
testcommon:
go test -race -v common
# code coverage
COVPKGS = common
coverage:
go build -v -o bin/gotestcover \
src/github.com/pierrre/gotestcover/*.go;
gotestcover -coverprofile=coverage.out -v $(COVPKGS)
go tool cover -html=coverage.out
.PHONY: get build clean fmt test coverage