forked from greenplum-db/gp-common-go-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 960 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
43
44
45
46
47
all: depend build test
SHELL := /bin/bash
.DEFAULT_GOAL := all
DIR_PATH=$(shell dirname `pwd`)
BIN_DIR=$(shell echo $${GOPATH:-~/go} | awk -F':' '{ print $$1 "/bin"}')
DEST = .
GOFLAGS :=
.PHONY : coverage
dependencies :
go get github.com/alecthomas/gometalinter
gometalinter --install
go get github.com/golang/dep/cmd/dep
dep ensure
@cd vendor/golang.org/x/tools/cmd/goimports; go install .
@cd vendor/github.com/onsi/ginkgo/ginkgo; go install .
format :
goimports -w .
gofmt -w -s .
lint :
! gofmt -l structmatcher/ | read
gometalinter --config=gometalinter.config -s vendor ./...
unit :
ginkgo -r -randomizeSuites -randomizeAllSpecs cluster dbconn gplog iohelper structmatcher 2>&1
test : lint unit
coverage :
@./show_coverage.sh
depend : dependencies
clean :
# Test artifacts
rm -rf /tmp/go-build*
rm -rf /tmp/gexec_artifacts*
rm -rf /tmp/ginkgo*
# Code coverage files
rm -rf /tmp/cover*
rm -rf /tmp/unit*