-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 675 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 675 Bytes
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
PYTHON ?= python
APP_DIR ?= src/function_app
DIST_DIR ?= dist
PACKAGE ?= $(DIST_DIR)/function_app.zip
.PHONY: install-dev lint test package clean
install-dev:
$(PYTHON) -m pip install --upgrade pip
@if [ -f $(APP_DIR)/requirements.txt ]; then $(PYTHON) -m pip install -r $(APP_DIR)/requirements.txt; fi
$(PYTHON) -m pip install flake8 pytest
lint:
flake8 $(APP_DIR) --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 $(APP_DIR) --count --max-complexity=10 --max-line-length=127 --statistics
test:
pytest -q tests
package:
mkdir -p $(DIST_DIR)
cd $(APP_DIR) && zip -r ../../$(PACKAGE) .
test -s $(PACKAGE)
clean:
rm -rf $(DIST_DIR) .pytest_cache