-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
168 lines (142 loc) · 3.32 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# -------------
# | Variables |
# -------------
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
EXIT_ON_CLIENT_DISCONNECT = true
# This variable will vary depending on where you installed Worlds, ideally, you
# should know the correct value for your own system.
#
# If you DON'T know the correct value, DO NOT file an issue on GitHub, ask
# someone within the Whirlsplash Discord server;
# https://discord.com/invite/8hn6padWF6.
#
# See line 59!
WORLDS_PATH = "C:\\Program Files (x86)\\Worlds Inc\\WorldsPlayer - Win7\\WorldsPlayer.exe"
# ------------
# | Wrappers |
# ------------
[tasks.fmt]
command = "cargo"
args = ["fmt"]
private = true
[tasks.check]
command = "cargo"
args = ["check"]
private = true
[tasks.clippy]
command = "cargo"
args = ["clippy"]
private = true
[tasks.test]
command = "cargo"
args = ["test"]
private = true
[tasks.bench]
command = "cargo"
args = ["bench"]
private = true
# -------------
# | Executors |
# -------------
[tasks.checkf]
workspace = false
dependencies = ["fmt", "check"]
[tasks.checkfc]
workspace = false
dependencies = ["fmt", "check", "clippy"]
[tasks.checkall]
workspace = false
dependencies = ["fmt", "check", "clippy", "test", "bench"]
[tasks.help]
workspace = false
dependencies = ["checkf"]
command = "cargo"
args = ["run", "--", "help"]
[tasks.run]
workspace = false
dependencies = ["checkf"]
command = "cargo"
args = ["run", "--", "run", "distributor,hub"]
# This task also depends on your system configuration, same goes as read above.
[tasks.start-client]
workspace = false
command = "gsudo"
args = ["${WORLDS_PATH}"]
[tasks.runc]
workspace = false
dependencies = ["start-client", "run"]
[tasks.runw]
workspace = false
env = { "DISABLE_PROMPT" = true }
dependencies = ["checkf"]
command = "cargo"
args = ["run", "--", "run", "distributor,hub"]
watch = true
[tasks.docker-build]
workspace = false
command = "nix-build"
args = ["docker.nix"]
[tasks.docker-load]
workspace = false
script_runner = "@shell"
script = '''
docker load < result
'''
[tasks.docker-run]
deprecated = true
workspace = false
command = "docker"
args = [
"run",
"--name", "Whirlsplash",
# API Distributor Hub
"-p", "8000:80", "-p", "6650:6650", "-p", "5673:5673",
"-v", "/var/lib/whirl:/.whirl",
"whirlsplash/whirl"
]
[tasks.docker-run-i]
deprecated = true
workspace = false
command = "docker"
args = [
"run",
"-it",
"--name", "Whirlsplash",
# API Distributor Hub
"-p", "8000:80", "-p", "6650:6650", "-p", "5673:5673",
"-v", "/var/lib/whirl:/.whirl",
"--env", "DISABLE_PROMPT=false",
"whirlsplash/whirl"
]
# Build 'n' load
[tasks.bnl]
workspace = false
dependencies = ["docker-build", "docker-load"]
[tasks.ask-github-token]
workspace = false
script = '''
#!@duckscript
echo github token:
github_token = read
echo set ${github_token} as the current github token
set_env GITHUB_TOKEN ${github_token}
'''
[tasks.act]
workspace = false
dependencies = ["ask-github-token"]
command = "act"
args = ["-s", "GITHUB_TOKEN=${GITHUB_TOKEN}"]
[tasks.lint-sql]
workspace = false
command = "sqlfluff"
args = ["lint", "./migrations/"]
[tasks.gen-docs]
workspace = false
toolchain = "nightly"
command = "cargo"
args = ["doc", "--open", "--document-private-items", "--no-deps"]
[tasks.kill]
workspace = false
command = "sudo"
args = ["killall", "-s", "SIGKILL", "whirl", "--exact", "--wait"]