-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
36 lines (25 loc) · 959 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
REPO ?= github.com/crackcomm/crawl
OUTPUT ?= ./dist
build-crawl-schedule:
mkdir -p $(OUTPUT)/crawl-schedule
cp ./nsq/crawl-schedule/Dockerfile $(OUTPUT)/crawl-schedule/
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -extldflags "-static"' -a -installsuffix cgo \
-o $(OUTPUT)/crawl-schedule/crawl-schedule ./nsq/crawl-schedule/main.go
dist: clean build-crawl-schedule
clean:
rm -rf dist
install-crawl-schedule:
go install $(REPO)/nsq/crawl-schedule
install: install-crawl-schedule
docker-images: dist
cd $(OUTPUT)/crawl-schedule && docker build -t crackcomm/crawl-schedule .
docker-deploy: docker-images
docker push crackcomm/crawl-schedule:latest
docs-deps:
go install github.com/crackcomm/tdc
docs: docs-deps
sh -c 'TDC_CRAWL_SCHEDULE_HELP=`go run nsq/crawl-schedule/main.go --help` \
TDC_SKELETON_HELP=`go run nsq/consumer/skeleton/main.go --help` \
tdc --input docs-templates/ --output .'
example:
go run examples/imdb/main.go