-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile.toml
61 lines (55 loc) · 1.04 KB
/
makefile.toml
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
[tasks.deps]
dependencies = [
"undeps",
"docker-compose-up",
"run-example-server",
]
[tasks.undeps]
dependencies = [
"stop-example-server",
"docker-compose-down",
]
[tasks.docker-compose-up]
private = true
command = "docker-compose"
args = ["up", "-d"]
[tasks.docker-compose-down]
private = true
command = "docker-compose"
args = ["down"]
[tasks.ensure-example-server-bin]
private = true
script_runner = "@shell"
script = [
'''
cd example-pitaya-server
go build main.go
'''
]
[tasks.run-example-server]
private = true
dependencies = [
"ensure-example-server-bin",
"stop-example-server"
]
script_runner = "@shell"
script = [
'''
cd example-pitaya-server
./main --port 3251 --type room --frontend=false > output.log 2>&1 &
echo $! > example-pitaya-server.pid
'''
]
[tasks.stop-example-server]
private = true
script_runner = "@shell"
script = [
'''
cd example-pitaya-server
if [[ -f example-pitaya-server.pid ]]; then
kill -TERM $(cat example-pitaya-server.pid)
rm example-pitaya-server.pid
fi
rm -f output.log
'''
]