-
Notifications
You must be signed in to change notification settings - Fork 223
/
Makefile
49 lines (40 loc) · 1.23 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
test: lint
@echo "--> Running Python tests"
py.test tests || exit 1
@echo ""
develop:
@echo "--> Installing dependencies"
pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install "file://`pwd`#egg=bless[tests]"
@echo ""
dev-docs:
# todo the docs, so typical, right?
clean:
@echo "--> Cleaning pyc files"
find . -name "*.pyc" -delete
rm -rf ./publish ./htmlcov
@echo ""
lint:
@echo "--> Linting Python files"
PYFLAKES_NODOCTEST=1 flake8 bless
@echo ""
coverage:
@echo "--> Running Python tests with coverage"
coverage run --branch --source=bless -m py.test tests || exit 1
coverage html
@echo ""
publish:
rm -rf ./publish/bless_lambda/
mkdir -p ./publish/bless_lambda
cp -r ./bless ./publish/bless_lambda/
cp ./publish/bless_lambda/bless/aws_lambda/bless* ./publish/bless_lambda/
cp -r ./aws_lambda_libs/. ./publish/bless_lambda/
if [ -d ./lambda_configs/ ]; then cp -r ./lambda_configs/. ./publish/bless_lambda/; fi
cd ./publish/bless_lambda && zip -FSr ../bless_lambda.zip .
compile:
./lambda_compile.sh
lambda-deps:
@echo "--> Compiling lambda dependencies"
docker run --rm -v ${CURDIR}:/src -w /src amazonlinux:2 ./lambda_compile.sh
.PHONY: develop dev-docs clean test lint coverage publish