-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
49 lines (40 loc) · 1.36 KB
/
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
48
49
PROJECT := github.com/vodkabears/yaspell
VERSION := $(shell git describe --tags --abbrev=0)
VERSION_FLAG := $(PROJECT)/config.version=$(VERSION)
DIST_FOLDER := dist
.PHONY: githooks
githooks:
cp -f githooks/* .git/hooks/
.PHONY: install
install: githooks
go get -u github.com/alecthomas/gometalinter
gometalinter --install
go get -u github.com/mitchellh/gox
go get -u github.com/msoap/go-carpet
go get -u github.com/go-playground/overalls
go get -u github.com/mattn/goveralls
go get -u github.com/vodkabears/yaspell
go install ./...
.PHONY: lint
lint:
yaspell -opts=IGNORE_UPPERCASE,IGNORE_DIGITS,IGNORE_URLS -dict=.yaspellignore README.md
gometalinter ./... --enable-all --line-length=100 --vendor --sort=path --sort=line --sort=column --deadline=5m -t -j 1
.PHONY: test
test:
go test -ldflags "-X ${VERSION_FLAG}" -cover ./...
.PHONY: cover
cover:
go-carpet
.PHONY: clean
clean:
rm -rf ${DIST_FOLDER}
.PHONY: build
build: clean
gox -ldflags "-X ${VERSION_FLAG}" -os="linux darwin windows" -arch="386 amd64" -output="${DIST_FOLDER}/{{.Dir}}_{{.OS}}_{{if eq .Arch \"386\"}}i386{{else}}{{.Arch}}{{end}}" ./...
.PHONY: run
run:
go run -ldflags "-X ${VERSION_FLAG}" *.go ${ARGS}
.PHONY: coveralls
coveralls:
overalls -project=$(PROJECT) -covermode=count
goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken 2zEPspDOcwDzRYBKbDmjk846HOf4ugxlO