-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
82 lines (65 loc) · 1.78 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
[config]
default_to_workspace = false
# *************************** #
# Flows #
# *************************** #
[tasks.default]
alias = "build"
[tasks.build]
clear = true
run_task = [
{ name = "package", condition = { platforms = ["mac"] } },
{ name = "build_release", condition = { platforms = ["linux", "windows"] } }
]
[tasks.run]
run_task = { name = ["update_yarn", "generate_css", "watch"] }
[tasks.run_silent]
depends = [
"update_yarn",
"generate_css",
"watch_silent"
]
# *************************** #
# Backend Compile #
# *************************** #
[tasks.build_release]
command = "cargo"
args = ["build", "--release"]
dependencies = ["build_frontend"]
[tasks.build_dev]
command = "cargo"
args = ["build"]
dependencies = ["build_frontend"]
[tasks.watch]
command = "cargo"
args = ["run", "--", "-c", "--watch-frontend"]
watch = {ignore_pattern = "frontend/*"}
[tasks.watch_silent]
command = "cargo"
args = ["run", "--", "-c", "--watch-frontend", "--silent-watch"]
watch = {ignore_pattern = "frontend/*"}
[tasks.package]
description = "Package for release using cargo-bundle"
install_crate = { crate_name = "cargo-bundle", binary = "cargo-bundle", test_arg = "-h" }
command = "cargo"
args = ["bundle", "--release"]
dependencies = ["build_frontend"]
# *************************** #
# Frontend #
# *************************** #
[tasks.update_yarn]
description = "Run initial yarn update/inistall"
script = [
'''
cd frontend
yarn install
''']
condition = { files_not_exist = ["${CARGO_MAKE_WORKING_DIRECTORY}/frontend/node_modules/.yarn-integrity"], fail_message = "Yarn already updated"}
[tasks.build_frontend]
description = "Build react frontend"
script = [
'''
cd frontend
yarn run build
''']
dependencies = ["update_yarn"]