Skip to content

Commit af440e5

Browse files
committed
Update Makefile and Travis config
1 parent d16056a commit af440e5

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.idea/
22

3-
.coveralls.yml
3+
npm-debug.log
44
coverage.out
5-
public/vendor/
65
db.sqlite3
6+
7+
public/vendor/
78
bindata.go

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ go:
66
- tip
77
before_install:
88
- npm install -g bower
9+
install:
910
- bower install
10-
install: make bindata
11+
- make deps
1112
script:
12-
- go get -t -v ./...
13-
- go tool vet .
14-
- go test -v -race ./...
13+
- make tests
1514
- go test -v -covermode=count -coverprofile=coverage.out
1615
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
1716
env:

Makefile

+16-12
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,34 @@ GOTOOLS = github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/jte
44

55
default: tests
66

7-
deps:
8-
@echo "--> Getting dependencies"
9-
@$(foreach gotool,$(GOTOOLS),$(shell go get -u $(gotool)))
7+
tests: format
8+
@echo "--> Running tests"
9+
@go tool vet .
10+
@go test -v ./...
1011

11-
format:
12-
@echo "--> Running go fmt"
13-
@go fmt ./...
12+
tools:
13+
@echo "--> Getting tools"
14+
@$(foreach gotool,$(GOTOOLS),$(shell go get -u $(gotool)))
1415

15-
tests:
16-
@echo "--> Running go test"
17-
@go test -v ./...
16+
deps: bindata
17+
@echo "--> Getting dependencies"
18+
@go get -t -v ./...
1819

19-
install: bindata format
20+
install: deps
2021
@echo "--> Build and install binary"
21-
@go get ./...
2222
@go install -ldflags $(GOLDFLAGS) ./...
2323

24-
bindata: deps
24+
bindata: tools
2525
@echo "--> Generate bindata"
2626
@go-bindata -pkg tornote templates/... \
2727
public/vendor/jquery/dist/jquery.slim.min.js \
2828
public/vendor/sjcl/sjcl.js \
2929
public/main.js \
3030
public/styles.css
3131

32+
format:
33+
@echo "--> Running go fmt"
34+
@go fmt ./...
35+
3236

3337
.PHONY: all deps format tests install bindata

0 commit comments

Comments
 (0)