forked from traefix/ngrok2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (39 loc) · 1.47 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
.PHONY: default server client deps fmt clean all release-all assets client-assets server-assets contributors
TAGS = release
DATA_FILES := $(shell find assets | sed 's/ /\\ /g')
GENERATED := pkg/client/assets/assets.go pkg/server/assets/assets.go
default: all
deps:
go get -tags '$(TAGS)' ./...
server: deps
go build -tags '$(TAGS)' github.com/traefix/ngrok2/cmd/nrklet
fmt:
go fmt github.com/traefix/ngrok2/...
client: deps
go build -tags '$(TAGS)' github.com/traefix/ngrok2/cmd/nrk
bindata: $(GENERATED)
gofmt -s -w pkg/client/assets pkg/server/assets
pkg/client/assets/assets.go: $(DATA_FILES)
rm -rf pkg/client/assets/
go-bindata -nomemcopy -pkg=assets -tags=$(TAGS) \
-debug=$(if $(findstring debug,$(TAGS)),true,false) \
-o=$@ assets/client/...
pkg/server/assets/assets.go: $(DATA_FILES)
rm -rf pkg/server/assets/
go-bindata -nomemcopy -pkg=assets -tags=$(TAGS) \
-debug=$(if $(findstring debug,$(TAGS)),true,false) \
-o=$@ assets/server/...
release-client: TAGS=release
release-client: client
release-server: TAGS=release
release-server: server
release-all: release-client release-server
all: client server
clean:
go clean -r github.com/traefix/ngrok2/...
rm -rf nrk nrklet
distclean: clean
rm -rf pkg/client/assets/ pkg/server/assets/
contributors:
echo "Contributors to ngrok, both large and small:\n" > CONTRIBUTORS
git log --raw | grep "^Author: " | sort | uniq | cut -d ' ' -f2- | sed 's/^/- /' | cut -d '<' -f1 >> CONTRIBUTORS