-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 1.17 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
37
38
39
40
41
ENV_FIELDS=$(shell cat .env | grep -v '^\#' | awk '/^(.*)=(.*)/ { print $$0 }' | tr '\n' ' ')
PREVIEW_LOCAL_IMAGE=$(shell docker image ls | grep 'local\.test' | awk '{ print $$3 }')
ERR = $(error found an error!)
ORG_PATH := ${CURDIR}
RED=`tput setaf 1`
GREEN=`tput setaf 2`
WHITE=`tput setaf 7`
MAKEFILE_DIR:=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
.PHONY: help
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: clean
clean: ## Cleanup database environment
rm -fR ./db/mysql_data
.PHONY: down
down: ## Docker compose down
docker-compose down;
.PHONY: devDB
devDB: ## Run development environment
docker-compose -f docker-compose-local.yml up;
.PHONY: devBoot
devBoot: ## Run development environment
export SPRING_PROFILES_ACTIVE=local && ./gradlew clean bootRun ;
.PHONY: run
run: ## Run production environment
docker-compose up --build;
.PHONY: genapi
genapi: ## Generate OpenAPI docs
export SPRING_PROFILES_ACTIVE=local && ./gradlew clean generateOpenApiDocs ;
.PHONY: err ## Error function to catch error while running Makefile
err: ; $(ERR)