-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile_example.toml
65 lines (50 loc) · 1.51 KB
/
Makefile_example.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
[env]
PSQL_URL = "postgres://username:password@localhost:5432/database_name"
DEPLOY_SSH = "[email protected]"
DEPLOY_PATH = "/home/pi/Documents/robo-arc"
DATABASE_URL = { unset = true }
[tasks.build]
command = "cargo"
args = ["build", "${@}"]
[tasks.build_release]
command = "cargo"
args = ["build", "--release", "${@}"]
[tasks.build_arm]
command = "cross"
args = ["build", "--target", "armv7-unknown-linux-gnueabihf", "--features", "vendored-openssl"]
[tasks.build_arm_release]
command = "cross"
args = ["build", "--target", "armv7-unknown-linux-gnueabihf", "--release", "--features", "vendored-openssl"]
[tasks.sqlx_migrate]
env = { "DATABASE_URL" = "${PSQL_URL}" }
command = "cargo"
args = ["sqlx", "migrate", "run"]
[tasks.sqlx_migrate_info]
env = { "DATABASE_URL" = "${PSQL_URL}" }
command = "cargo"
args = ["sqlx", "migrate", "info"]
[tasks.offline]
alias = "sqlx_prepare"
[tasks.sqlx_prepare]
env = { "DATABASE_URL" = "${PSQL_URL}" }
command = "cargo"
args = ["sqlx", "prepare"]
[tasks.offline_check]
alias = "sqlx_prepare_check"
[tasks.sqlx_prepare_check]
env = { "DATABASE_URL" = "${PSQL_URL}" }
command = "cargo"
args = ["sqlx", "prepare", "--check"]
[tasks.git_reset]
command = "git"
args = ["reset", "--hard"]
[tasks.git_pull]
command = "git"
args = ["pull"]
[tasks.pi]
dependencies = ["git_reset", "git_pull", "sqlx_migrate", "sqlx_migrate_info", "build_arm_release"]
[tasks.scp]
alias = "deploy"
[tasks.deploy]
command = "scp"
args = ["./target/armv7-unknown-linux-gnueabihf/release/arc_bot", "${DEPLOY_SSH}:${DEPLOY_PATH}"]