-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (37 loc) · 1.07 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
REMOTE_TARGET := [email protected]
REMOTE_TARGET_ROOT := [email protected]
.PHONY: all
all: zip upload cleanup-remote run-remote-steam
.PHONY: daemon
daemon: build upload cleanup-remote daemon-remote
.PHONY: build
build:
go build -ldflags "-X 'github.com/lucaber/deckjoy/pkg/config.Version=0.1.0'" -o deckjoy main.go
.PHONY: zip
zip: build
-rm deckjoy.zip
mkdir -p build
cp deckjoy build
cp assets/* build
cp README.md build
cd build && zip ../deckjoy.zip *
rm -r build
.PHONY: upload
upload:
rsync deckjoy.zip $(REMOTE_TARGET):deckjoy.zip
ssh $(REMOTE_TARGET) unzip -u -o deckjoy.zip -d deckjoy
rsync deckjoy $(REMOTE_TARGET_ROOT):deckjoy
.PHONY: run-remote-steam
run-remote-steam:
ssh $(REMOTE_TARGET) steam steam://rungameid/11433172314573766656 # get id by creating a desktop shortcut
.PHONY: run-remote
run-remote:
ssh $(REMOTE_TARGET) ./deckjoy gui
.PHONY: daemon-remote
daemon-remote:
ssh $(REMOTE_TARGET_ROOT) ./deckjoy daemon
.PHONY: cleanup-remote
cleanup-remote:
-ssh $(REMOTE_TARGET_ROOT) killall deckjoy
sleep 1
-ssh $(REMOTE_TARGET_ROOT) ./deckjoy cleanup