-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (51 loc) · 1.47 KB
/
Makefile
File metadata and controls
56 lines (51 loc) · 1.47 KB
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
##
## DEPENDENCIES
## ================
## * UNIX operating system
## * GNU Make >= 4.3
## * GNU Bash >= 3.2.57
## setup initial development environment
setup:
@npm i && \
cat apps/bookkeeper-api/.env.example > "apps/bookkeeper-api/.env" && \
echo "NODE_ENV=test\nPG_DB_NAME=bookkeeper_test" > "apps/bookkeeper-api/.env.test" && \
make start && \
node apps/bookkeeper-api/ace create:db bookkeeper_test
## start development environment with docker-compose
start:
@docker-compose up -d
## stop development environment with docker-compose
stop:
@docker-compose down
# Credit: https://gist.github.com/prwhite/8168133#gistcomment-2749866
help:
@printf "Usage\n";
@awk '{ \
if ($$0 ~ /^.PHONY: [a-zA-Z\-\_0-9]+$$/) { \
helpCommand = substr($$0, index($$0, ":") + 2); \
if (helpMessage) { \
printf "\033[36m%-20s\033[0m %s\n", \
helpCommand, helpMessage; \
helpMessage = ""; \
} \
} else if ($$0 ~ /^[a-zA-Z\-\_0-9.]+:/) { \
helpCommand = substr($$0, 0, index($$0, ":")); \
if (helpMessage) { \
printf "\033[36m%-20s\033[0m %s\n", \
helpCommand, helpMessage; \
helpMessage = ""; \
} \
} else if ($$0 ~ /^##/) { \
if (helpMessage) { \
helpMessage = helpMessage"\n "substr($$0, 3); \
} else { \
helpMessage = substr($$0, 3); \
} \
} else { \
if (helpMessage) { \
print "\n "helpMessage"\n" \
} \
helpMessage = ""; \
} \
}' \
$(MAKEFILE_LIST)