forked from pksunkara/alpaca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (35 loc) · 1.1 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
VERSION = 0.2.1
GO_RICE = rice
GO_FMT = gofmt -w
GO_XC = goxc
GOXC_FILE = .goxc.local.json
DEPS = \
github.com/GeertJohan/go.rice/rice \
github.com/robertkrimen/terst \
github.com/jessevdk/go-flags \
github.com/kardianos/osext \
bitbucket.org/pkg/inflect
all:deps templates
templates:clean
$(GO_RICE) --import-path github.com/pksunkara/alpaca/alpaca embed
compile:templates goxc
goxc:
$(shell echo '{\n "ArtifactsDest": "build",\n "ConfigVersion": "0.9",' > $(GOXC_FILE))
$(shell echo ' "PackageVersion": "$(VERSION)",\n "TaskSettings": {' >> $(GOXC_FILE))
$(shell echo ' "bintray": {\n "apikey": "",\n "package": "alpaca",' >> $(GOXC_FILE))
$(shell echo ' "repository": "utils",\n "subject": "pksunkara"' >> $(GOXC_FILE))
$(shell echo ' }\n }\n}' >> $(GOXC_FILE))
$(GO_XC)
bintray:
$(GO_XC) bintray
test:
go test -v ./...
test-cover:
go test -coverprofile=coverage.out github.com/pksunkara/alpaca/alpaca
go tool cover -html=coverage.out
install:
go install -a github.com/pksunkara/alpaca
deps:
go get -u $(DEPS)
clean:
$(GO_RICE) --import-path github.com/pksunkara/alpaca/alpaca clean