-
Notifications
You must be signed in to change notification settings - Fork 0
/
Commands
56 lines (39 loc) · 1.33 KB
/
Commands
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
###############################################################################
# Database
###############################################################################
command db::init do
# Since Postgres doesn’t support something like “CREATE DATABASE IF NOT EXISTS”,
# well just run the following command and discard the the error it will produce
# if already created via the `try do <code block>` function.
try do
createdb my-db
psql -d my-db -tc
"""
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
"""
from ./backend/some-path do
stack build
stack exec provision-db
echo "Setup complete."
command db::teardown do
echo "todo command db::teardown"
###############################################################################
# Utils
###############################################################################
command util::run-chrome do
# Usually commands ending with an ‘_’ will redirect stdout/stderr to `/dev/null`.
run_ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--app=http://127.0.0.1:3000
--auto-open-devtools-for-tabs
command noop do
echo "done"
command test do
lorem <- echo "lorem ipsum"
parallel do
echo "first"
echo "second"
silent echo "third"
echo "done"
command test::ops do
echo "lorem ipsum"
| save lorem.txt