forked from magic-fit/magic-cv-developer-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (58 loc) · 1.65 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env make
PROJECT_NAME ?= magic-cv-developer-test
PROJECT_VERSION ?= 0.1.0
PROJECT_DESCRIPTION ?= Magic Tech - Data scientist assessment - Starter code
ENV ?= local
-include config/.env.${ENV}
-include config/secrets/.env.*.${ENV}
export
.DEFAULT_GOAL := help
.PHONY: help #: List available command.
help:
@${AWK} 'BEGIN {FS = " ?#?: "; print "$(PROJECT_NAME) $(PROJECT_VERSION)\n$(PROJECT_DESCRIPTION)\n\nUsage: make \033[36m<command>\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST)
.PHONY: docs #: Run documentation.
docs:
@false
.PHONY: lint #: Run linting.
lint:
@false
.PHONY: tests #: Run tests.
tests:
@${MVN} test
.PHONY: run #: Run backend app.
run:
@${MVN} -pl modules/008-vikashkothary-app -am spring-boot:run
# Run scripts using make
%:
@if [[ -f "scripts/${*}.sh" ]]; then \
${BASH} "scripts/${*}.sh"; else exit 1; fi
.PHONY: config
config: config/.env.${ENV}
config/.env.%:
@cp -n config/.env.example config/.env.${ENV}
.PHONY: init #: Download project dependencies.
init:
@${MVN} initialize
.PHONY: release #: Create a new version.
release:
@false
.PHONY: build #: Build maven modules.
build:
@${MVN} compile -DskipTests
.PHONY: publish #: Publish maven modules.
publish:
@false
.PHONY: package #: Create app package.
package:
@${MVN} package -DskipTests=true -Dmaven.test.skip=true
.PHONY: deploy #: Deploy app packages.
deploy:
@${MAKE} clean package heroku-deploy heroku-logs
# @${MVN} deploy
.PHONY: clean #: Clean project build files.
clean:
@${MVN} clean
@[[ -z "${FORCE}" ]] || ${MVN} post-clean
.PHONY: open
open:
@${OPEN} ${BACKEND_VIKASHKOTHARY_URL}