-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (36 loc) · 1.22 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
GO=go
GULP=gulp
RM=rm
SSH=SSH
KEY=~/azure/key.pem
SCP=scp
SRC=main.go
.PHONY: client clean all run clean clean-client clean-server publish-all publish-server publish-client
all: bin/avalon client
run:
$(GO) run $(SRC)
bin/avalon: $(SRC)
#GOOS=linux GOARCH=amd64 $(GO) build -o bin/avalon -tags newrelic $(SRC)
GOOS=linux GOARCH=amd64 $(GO) build -o bin/avalon $(SRC)
bin/touche.linux.x86-32: $(SRC)
GOOS=linux GOARCH=386 $(GO) build -o bin/touche.linux.x86-32 $(SRC)
bin/touche.linux.x86-64: $(SRC)
GOOS=linux GOARCH=amd64 $(GO) build -o bin/touche.linux.x86-64 $(SRC)
clean-client:
$(RM) -rf dist
clean-server:
-$(RM) bin/avalon
clean: clean-client clean-server
client:
$(GULP)
publish-all: publish-client publish-server
publish-client: clean-client client
$(SCP) -oIdentityFile=$(KEY) -r dist [email protected]:ava
publish-server: clean-server bin/avalon
#-$(SSH) $(HOST) -i $(KEY) "cd ava && ./stop"
$(SCP) -oIdentityFile=$(KEY) -r bin/avalon [email protected]:ava/avalon.new
#$(SSH) $(HOST) -i $(KEY) "cd ava && ./start"
dist: bin/touche.linux.x86-32 bin/touche.linux.x86-64 clean-client client
-rm touche.tgz
tar -czf touche.tgz dist -C bin touche.linux.x86-32 touche.linux.x86-64