-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.toml
36 lines (30 loc) · 1.15 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
[tasks.prepare]
script = '''
#!/usr/bin/env bash
rm -rf target/sqlx
touch {services,crates}/*/src/*.rs
env -u DATABASE_URL SQLX_OFFLINE=false cargo check --workspace
jq -s '{"db": "MySQL"} + INDEX(.hash)' target/sqlx/query-*.json > sqlx-data.json
'''
[tasks.fetch-db]
script = '''
#!/usr/bin/env bash
AUTH=auth
CHARACTERS=characters
mkdir -p schema
printf "use $AUTH;\n" > schema/01_$AUTH.sql
printf "use $CHARACTERS;\n" > schema/02_$CHARACTERS.sql
curl https://raw.githubusercontent.com/TrinityCore/TrinityCore/3.3.5/sql/create/create_mysql.sql > schema/00_databases.sql
curl https://raw.githubusercontent.com/TrinityCore/TrinityCore/3.3.5/sql/base/${AUTH}_database.sql >> schema/01_$AUTH.sql
curl https://raw.githubusercontent.com/TrinityCore/TrinityCore/3.3.5/sql/base/${CHARACTERS}_database.sql >> schema/02_$CHARACTERS.sql
'''
[tasks.world]
command = "cargo"
args = ["run", "--bin", "azerust-world", "config-world.yaml", "${@}"]
[tasks.auth]
command = "cargo"
args = ["run", "--bin", "azerust-auth", "config-auth.yaml", "${@}"]
[env]
RUST_LOG = "azerust_world,azerust_auth,azerust_mysql_auth,azerust_mysql_characters,ERROR"
[config]
default_to_workspace = false