-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.28 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
50
51
52
53
54
55
56
57
58
59
60
61
CURRENT_GITHASH=`git rev-parse HEAD`
APP_NAME=go-hbcid
VPATH=.:src:$(GOPATH)/src:
setup: deps
@echo Checking availability of Go (make sure it's at least Go 1.2)
go version
@echo Checking availability of Git
git --version
update:
@echo Updating dependencies
go get github.com/golang/glog
go get github.com/golang/lint
go get github.com/stretchr/testify
go get github.com/dchest/uniuri
build: deps
go build -o build/server src/main.go
package: build
rm -f build/$(APP_NAME).deb
fpm -s dir -t deb -n $(APP_NAME) -p build/$(APP_NAME).deb -v $(CURRENT_GITHASH) --description "$(APP_NAME) $(CURRENT_GITHASH)" -x "*.deb" build/
run: deps
go run src/main.go -stderrthreshold=INFO
test: deps
go test ./src/...
coverage:
@echo Coverage not implemented
lint: github.com/golang/lint
$(GOPATH)/bin/golint src
loc:
cloc src/
doc:
@echo Documentation not implemented
clean:
rm build/*
deps: github.com/stretchr/testify github.com/golang/glog github.com/dchest/uniuri github.com/fzzy/radix/redis
github.com/stretchr/testify:
go get github.com/stretchr/testify
github.com/golang/glog:
go get github.com/golang/glog
github.com/golang/lint:
go get github.com/golang/lint
github.com/dchest/uniuri:
go get github.com/dchest/uniuri
github.com/fzzy/radix/redis:
go get github.com/fzzy/radix/redis