-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 779 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 779 Bytes
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
# Commands
GO_CMD = go
LINT_CMD = $(GOPATH)/bin/golint
# Directories
PACKAGE = github.com/minimalchat/chatctl
SRC = $(GOPATH)/src/$(PACKAGE)
DIST = $(GOPATH)/bin
.PHONY: lint build
build: lint test coverage clean compile
run: lint test go
lint:
$(LINT_CMD) $(SRC)
# $(LINT_CMD) $(SRC) $(TEST)
test:
cd $(SRC)
$(GO_CMD) test -v ./...
# $(GOPATH)/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $(COVERALLS_TOKEN)
coverage:
cd $(SRC)
$(DIST)/overalls -project=$(PACKAGE) -covermode=count
$(GOPATH)/bin/goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken $(COVERALLS_TOKEN)
clean:
rm -rf $(DIST)/chatctl
compile:
mkdir -p $(DIST)
cd $(SRC)
$(GO_CMD) build -o $(DIST)/chatctl
go:
cd $(SRC)
$(GO_CMD) run main.go