-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSupfile
More file actions
75 lines (62 loc) · 1.38 KB
/
Supfile
File metadata and controls
75 lines (62 loc) · 1.38 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Supfile for sketchgrounddk
---
version: 0.4
networks: #Groups of hosts
dev:
env:
SGBUILD: DEVEL
hosts:
- localhost
release:
env:
SGBUILD: RELEASE
GOOS: linux
GOARCH: amd64
hosts:
- jzs@sketchground.dk:999
testing:
env:
SGBUILD: RELEASE
GOOS: linux
GOARCH: amd64
hosts:
- jzs@46.101.187.69
commands:
clean:
desc: Clean dist folder
local: rm -rf dist-sketchground
dist: # We always build on local machine
desc: Build a version that can be distributed
local: ./release.sh
upload:
desc: Upload
upload:
- src: ./dist-sketchground
dst: /tmp/
copy-bin:
desc: Copy binary
run: sudo cp /tmp/dist-sketchground/sketchground /usr/local/bin/sketchground
copy-www:
desc: Copy www-data
run: sudo mkdir -p /var/www/sketchgrounddk; sudo cp -r /tmp/dist-sketchground/www/* /var/www/sketchgrounddk/
restart-service:
desc: Restart systemd service
run: sudo systemctl restart sketchground.service
start-service:
desc: Start systemd service
run: sudo systemctl start sketchground.service
stop-service:
desc: Stop systemd service
run: sudo systemctl stop sketchground.service
targets:
rebuild:
- clean
- dist
deploy:
- clean
- dist
- upload
- copy-www
- stop-service
- copy-bin
- start-service