This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
generated from TrueDoctor/DiscoBot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.toml
94 lines (78 loc) · 2.11 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
extend = "./scripts/cargo-helpers.toml"
[config]
additional_profiles = [ "watch" ]
# component builds
[tasks.all]
dependencies = ["backend", "frontend", "lobby" ]
workspace = false
[tasks.frontend]
workspace = false
dependencies = [ ]
command = "cargo"
args = [ "make", "--cwd", "wasm/", "--makefile", "Makefile.toml", "all", "--profile", "production" ]
[tasks.backend]
workspace = false
dependencies = [ "rask-engine", "rask-server", "lobby" ]
# package builds
[tasks.rask-server]
workspace = false
command = "cargo"
args = [ "make", "exec-${BUILD_ENV}", "--", "build", "-p", "rask-server" ]
[tasks.rask-engine]
workspace = false
command = "cargo"
args = [ "make", "exec-${BUILD_ENV}", "--", "build", "-p", "rask-engine" ]
[tasks.lobby]
workspace = false
command = "cargo"
args = [ "make", "exec-${BUILD_ENV}", "--", "build", "-p", "lobby" ]
# dev tools
[tasks.serve]
workspace = false
watch = true
dependencies = [ "stop", "backend", "lobby" ]
script = [
'''
cargo make serve-lobby &
#sleep 5 && ./scripts/dev-server &
cargo make serve-backend
''']
[tasks.stop]
workspace = false
watch = true
script = [
'''
#kill $(pgrep ./scripts/dev-server -f) 2>/dev/null || true
kill $(pgrep target/debug/lobby -f) 2>/dev/null || true
kill $(pgrep target/debug/rask-server -f) 2>/dev/null || true
''']
[tasks.serve-frontend]
command = "./scripts/dev-server"
workspace = false
args = [ "${@}" ]
watch = true
dependencies = [ "frontend" ]
[tasks.serve-backend]
workspace = false
command = "cargo"
watch = true
args = [ "make", "exec-${BUILD_ENV}", "--", "run", "-p", "rask-server" ]
[tasks.serve-lobby]
workspace = false
command = "cargo"
watch = true
args = [ "make", "exec-${BUILD_ENV}", "--", "run", "-p", "lobby" ]
[tasks.cleanup]
workspace = false
dependencies = [ "clean" ]
script = [
"rm -r $(git rev-parse --show-toplevel 2>/dev/null)/client/gen 2>/dev/null || true"
]
# upstream `ci-flow` task appears to have problems with wasm
[tasks.ci-flow]
workspace = false
dependencies = [ "cleanup", "all", "check-format", "test" ]
# testierung
[tasks.test]
workspace = false
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--all --exclude wasm-sync" }