-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (30 loc) · 1.42 KB
/
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
#COLORS
GREEN := $(shell tput -Txterm setaf 2)
WHITE := $(shell tput -Txterm setaf 7)
YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
# A category can be added with @category
HELP_FUN = \
%Targets; \
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
print "\n${WHITE}usage:\n"; \
print " ${YELLOW}make <target> ${GREEN} Replace the <target> with one of below operations.\n\n"; \
for (sort keys %help) { \
print "${WHITE}$$_:${RESET}\n"; \
for (@{$$help{$$_}}) { \
$$sep = " " x (32 - length $$_->[0]); \
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
}; \
print "\n"; }
help: ##@target Show target help options.
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
start-app-db: FORCE ##@target Starts the app and db with sample data dump
./scripts/start.sh
stop-app-db: FORCE ##@target stops the app and db with sample data dump
docker compose down && docker container prune -f && docker rmi abhisheksr01/python-postgres-azure:local -f && docker ps -a
clear: FORCE ##@target Clears the "__pycache__" & ".pytest_cache". Will be required to run twice.
@find . -name "__pycache__" -exec rm -rf {} \;
@find . -name ".pytest_cache" -exec rm -rf {} \;
FORCE: