-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
47 lines (33 loc) · 958 Bytes
/
Makefile
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
#
# Backtick Makefile
#
DATABASE?=backtick
all: run
run:
lein trampoline run
install:
lein install
###
### Database
###
db_init:
-createuser -s postgres -h localhost
-createdb -Upostgres -h localhost $(DATABASE)
-createdb -Upostgres -h localhost $(DATABASE)_test
db_drop:
-dropdb -Upostgres -h localhost $(DATABASE)
-dropdb -Upostgres -h localhost $(DATABASE)_test
db_migrate:
DATABASE_URL="jdbc:postgresql://localhost:5432/$(DATABASE)?user=postgres" lein run -m common.db.migrate/run-migrate
DATABASE_URL="jdbc:postgresql://localhost:5432/$(DATABASE)_test?user=postgres" CONF_ENV=test lein with-profile +test run -m common.db.migrate/run-migrate
db_rebuild: db_drop db_init db_migrate
# Nuke the existing databases and recreate
rebuild: drop init migrate
test:
CONF_ENV=test lein test
# Run test refresh with the correct profile and injections.
test_refresh:
CONF_ENV=test lein test-refresh
.PHONY: test
deploy:
lein deploy tprime