-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmise.toml
58 lines (50 loc) · 1.34 KB
/
mise.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
# Tools that can not be installed directly from devbox because of version issue
[tools]
elixir = "1.17.3-otp-27"
[env]
MISE_TASK_TIMINGS = 1
BASE_DIR = "{{ config_root }}"
PROJECT_DIR = "{{ env.BASE_DIR }}/library"
[tasks."reset:local"]
description = "Clean and setup everything again."
run = [
"mise run reset:csv",
"mise run reset:db",
"mise run setup",
"(cd $PROJECT_DIR && mix run priv/repo/seeds.exs)",
]
[tasks.setup]
description = "Install dependencies and setup project"
run = [
"mise install",
"mise run install:lang:elixir",
"(cd $PROJECT_DIR && mix setup)",
]
[tasks."init:db"]
description = "Create the database."
run = [
"mkdir -p $PGDATA",
"devbox services start postgresql",
"initdb -U $POSTGRES_USER -D $PGDATA",
"createdb -U $POSTGRES_USER $POSTGRES_DB",
]
[tasks."install:lang:elixir"]
description = "Install Elixir, hex and rebar."
run = [
"mise install elixir",
"mix local.hex --force",
"mix local.rebar --force",
]
[tasks."destroy:db"]
description = "Remove the database and its data folder."
run = "rm -rf $PGDATA/*"
[tasks."reset:db"]
description = "Remove and initialize the database."
run = [
"devbox services stop postgresql || true",
"mise run destroy:db",
"mise run init:db",
]
[tasks."reset:csv"]
description = "Remove and initialize the csv data folder."
run = ["rm -rf $CSV_DATA", "mkdir -p $CSV_DATA"]