-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (45 loc) · 1.34 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
################################################################################
#
# {{ cookiecutter.macro_name }}
#
################################################################################
ifndef VERBOSE
.SILENT:
endif
RM = rm -f
ECHO = echo -e
TAG = etags
PIP = pip
PYTHON = python3
SHELL = /bin/bash
WHICH = /usr/bin/which
WATCH = /usr/bin/watch
TEST = /usr/bin/test
ZIP = /usr/bin/zip
SRC = function.py
AWS = aws
VENV ?= .venv
VENV_ACTIVATE =. $(VENV)/bin/activate
STACK :=lambda-function-{{ cookiecutter.macro_name }}
FUNCTION_NAME :={{ cookiecutter.macro_name }}
BUCKET_NAME :={{ cookiecutter.bucket_name }}
export VIRTUAL_ENV := $(abspath ${VENV})
export PATH := ${VIRTUAL_ENV}/bin:${PATH}
all : venv build provision
${VENV} :
$(PYTHON) -m venv $@
venv-install : requirements.txt | ${VENV}
$(PIP) install -U pip
$(PIP) install -r requirements.txt
venv-dev-install : requirements_dev.txt | ${VENV}
$(PIP) install --upgrade -r requirements_dev.txt
venv :
test -d ${VENV} || $(MAKE) venv-install
$(VENV_ACTIVATE)
$(WHICH) python
build : $(VENV_ACTIVATE)
vagrant up --parallel
provision : $(VENV_ACTIVATE)
$(WHICH) ansible
vagrant provision --provision-with rproxy
.PHONY : all venv venv-install build provision