-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.maple
87 lines (74 loc) · 2.17 KB
/
build.maple
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
plugins = [ 'v' ]
task:db.init = {
description = 'Initialize and start a local Postgres database via Docker'
category = 'db'
run = 'docker run -it \
--name beep-database \
-e POSTGRES_DB=beep \
-e POSTGRES_USER=beep \
-e POSTGRES_PASSWORD=beep \
--mount source=beep-data,target=/var/lib/postgresql/data \
-p 5432:5432 \
postgres:15'
}
task:db.start = {
description = 'Start the docker image for the local database'
category = 'db'
run = 'docker start beep-database'
}
task:db.stop = {
description = 'Stop the docker image for the local database'
category = 'db'
run = 'docker stop beep-database'
}
task:db.login = {
description = 'Log into and modify the local database'
category = 'db'
run = 'docker exec -it beep-database psql -h localhost -p 5432 -d beep -U beep -W'
}
task:db.shell = {
description = 'Open a shell in the local database'
category = 'db'
run = 'docker exec -it beep-database sh'
}
task:db.dangerous.nuke = {
description = 'Delete the docker image AND ITS DATA. This will delete **EVERYTHING** in the database.'
category = 'db'
run = 'docker rm beep-database && docker volume rm beep-data'
}
task:ngrok = {
description = 'Open an ngrok tunnel for testing.'
category = 'misc'
run = 'ngrok http http://localhost:8008'
}
task:ngrok.url = {
description = 'Open an ngrok tunnel for testing. Requires you to pass the ngrok URL as an argument.'
category = 'misc'
run = 'ngrok http --url=${args} http://localhost:8008'
}
task:run.watch = {
description = 'Watch/run beep'
category = 'run'
run = '${v} -d veb_livereload watch run ${v_main} config.maple'
}
task:run.watch.real = {
description = 'Watch/run beep using config.real.maple'
category = 'run'
run = '${v} watch run ${v_main} config.real.maple'
}
task:run = {
description = 'Run beep'
category = 'run'
run = '${v} run ${v_main} config.maple'
}
task:run.real = {
description = 'Run beep using config.real.maple'
category = 'run'
run = '${v} run ${v_main} config.real.maple'
}
task:cloc = {
description = 'Get the lines of code for beep!'
category = 'misc'
//todo: contribute vlang support to cloc and use that here instead of it seeing all of our v code as verilog code
run = 'cloc ./src/'
}