File tree 3 files changed +23
-21
lines changed
3 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 1
- CMDS := $( GOPATH ) /bin/houndd $( GOPATH ) /bin/hound
1
+ CMDS := .build /bin/houndd .build /bin/hound
2
2
3
3
SRCS := $(shell find . -type f -name '* .go')
4
4
@@ -11,25 +11,27 @@ ALL: $(CMDS)
11
11
12
12
ui : ui/bindata.go
13
13
14
- node_modules :
14
+ # the mtime is updated on a directory when its files change so it's better
15
+ # to rely on a single file to represent the presence of node_modules.
16
+ node_modules/build :
15
17
npm install
18
+ date -u >> $@
16
19
17
- $( GOPATH ) /bin/houndd : ui/bindata.go $(SRCS )
18
- go install github.com/hound-search/hound/cmds/houndd
20
+ .build /bin/houndd : ui/bindata.go $(SRCS )
21
+ go build -o $@ github.com/hound-search/hound/cmds/houndd
19
22
20
- $( GOPATH ) /bin/hound : ui/bindata.go $(SRCS )
21
- go install github.com/hound-search/hound/cmds/hound
23
+ .build /bin/hound : ui/bindata.go $(SRCS )
24
+ go build -o $@ github.com/hound-search/hound/cmds/hound
22
25
23
26
.build/bin/go-bindata :
24
- GOPATH= ` pwd ` /. build go get github.com/go-bindata/go-bindata/...
27
+ go build -o $@ github.com/go-bindata/go-bindata/go-bindata
25
28
26
- ui/bindata.go : .build/bin/go-bindata node_modules $(wildcard ui/assets/** /* )
29
+ ui/bindata.go : .build/bin/go-bindata node_modules/build $(wildcard ui/assets/** /* )
27
30
rsync -r ui/assets/* .build/ui
28
31
npx webpack $(WEBPACK_ARGS )
29
32
$< -o $@ -pkg ui -prefix .build/ui -nomemcopy .build/ui/...
30
33
31
- dev : ALL
32
- npm install
34
+ dev : node_modules/build
33
35
34
36
test :
35
37
go test github.com/hound-search/hound/...
Original file line number Diff line number Diff line change @@ -125,21 +125,15 @@ Currently the following editors have plugins that support Hound:
125
125
* make
126
126
* Node.js ([ Installation Instructions] ( https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager ) )
127
127
128
- Hound includes a ` Makefile ` to aid in building locally, but it depends on the source being added to a proper Go workspace so that
129
- Go tools work accordingly. See [ Setting GOPATH] ( https://github.com/golang/go/wiki/SettingGOPATH ) for further details about setting
130
- up your Go workspace. With a ` GOPATH ` set, the following commands will build hound locally.
128
+ While Hound is a proper go module that can be installed with ` go install ` , there is also a ` Makefile ` to aid in building locally.
131
129
132
130
```
133
- git clone https://github.com/hound-search/hound.git ${GOPATH}/src/github.com/hound-search/hound
134
- cd ${GOPATH}/src/github.com/hound-search/ hound
131
+ git clone https://github.com/hound-search/hound.git
132
+ cd hound
135
133
make
136
134
```
137
135
138
- If this is your only Go project, you can set your GOPATH just for Hound:
139
- ```
140
- git clone https://github.com/hound-search/hound.git src/github.com/hound-search/hound
141
- GOPATH=$(pwd) make -C src/github.com/hound-search/hound
142
- ```
136
+ The hound executables will be available in ` .build/bin ` .
143
137
144
138
### Testing
145
139
@@ -182,7 +176,7 @@ make dev
182
176
Then run the hound server with the --dev option:
183
177
184
178
```
185
- bin/houndd --dev
179
+ .build/ bin/houndd --dev
186
180
```
187
181
188
182
## Get in Touch
Original file line number Diff line number Diff line change
1
+ package tools
2
+
3
+ import (
4
+ // used for bundling ui assets
5
+ _ "github.com/go-bindata/go-bindata"
6
+ )
You can’t perform that action at this time.
0 commit comments