-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
34 lines (25 loc) · 855 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
VENV=.venv/bin
REQUIREMENTS=$(wildcard requirements.txt development.txt)
MARKER=.initialized-with-makefile
VENVDEPS=$(REQUIREMENTS setup.py)
$(VENV):
python -m venv .venv
$(VENV)/python -m pip install --upgrade pip setuptools wheel
yarn
$(VENV)/$(MARKER): $(VENVDEPS) | $(VENV)
$(VENV)/pip install $(foreach path,$(REQUIREMENTS),-r $(path))
touch $(VENV)/$(MARKER)
.PHONY: venv lint test clean build release
venv: $(VENV)/$(MARKER)
lint: venv
$(VENV)/pylint percy/* tests/*
test: venv
npx percy exec --testing -- $(VENV)/python -m unittest tests.test_snapshot
$(VENV)/python -m unittest tests.test_cache
$(VENV)/python -m unittest tests.test_driver_metadata
clean:
rm -rf $$(cat .gitignore)
build: venv
$(VENV)/python setup.py sdist bdist_wheel
release: build
$(VENV)/twine upload dist/* --username __token__ --password ${PYPI_TOKEN}