forked from hound-search/hound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 818 Bytes
/
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
CMDS := $(GOPATH)/bin/houndd $(GOPATH)/bin/hound
SRCS := $(shell find . -type f -name '*.go')
WEBPACK_ARGS := -p
ifdef DEBUG
WEBPACK_ARGS := -d
endif
ALL: $(CMDS)
ui: ui/bindata.go
node_modules:
npm install
$(GOPATH)/bin/houndd: ui/bindata.go $(SRCS)
go install github.com/hound-search/hound/cmds/houndd
$(GOPATH)/bin/hound: ui/bindata.go $(SRCS)
go install github.com/hound-search/hound/cmds/hound
.build/bin/go-bindata:
GOPATH=`pwd`/.build go get github.com/go-bindata/go-bindata/...
ui/bindata.go: .build/bin/go-bindata node_modules $(wildcard ui/assets/**/*)
rsync -r ui/assets/* .build/ui
npx webpack $(WEBPACK_ARGS)
$< -o $@ -pkg ui -prefix .build/ui -nomemcopy .build/ui/...
dev: ALL
npm install
test:
go test github.com/hound-search/hound/...
npm test
clean:
rm -rf .build node_modules