-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (30 loc) · 917 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
export PIPENV_VENV_IN_PROJECT=true
ENV := .venv
INPUT := {{cookiecutter.project_name}}
OUTPUT := demo_project
# MAIN ########################################################################
.PHONY: all
all: install
.PHONY: ci
ci: build
make ci -C $(OUTPUT) CI=true
.PHONY: watch
watch: install
rm -rf $(OUTPUT)/*
@ sleep 2 && touch $(INPUT)/Pipfile &
pipenv run watchmedo shell-command --command="clear; make ci" --recursive --wait $(INPUT)
# DEPENDENCIES ################################################################
.PHONY: install
install: $(ENV)
$(ENV): Pipfile*
pipenv install
@ touch $@
# BUILD #######################################################################
.PHONY: build
build: install
pipenv run cookiecutter . --no-input --overwrite-if-exists
# CLEANUP #####################################################################
.PHONY: clean
clean:
rm -rf $(OUTPUT)
rm -rf $(ENV)