forked from venthur/dotenv-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (42 loc) · 955 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
43
44
45
46
47
48
49
50
51
52
# system python interpreter. used only to create virtual environment
PY = python3
VENV = venv
BIN=$(VENV)/bin
ifeq ($(OS), Windows_NT)
BIN=$(VENV)/Scripts
PY=python
endif
.PHONY: all
all: test lint mypy
$(VENV): requirements-dev.txt setup.py
$(PY) -m venv $(VENV)
$(BIN)/pip install --upgrade -r requirements-dev.txt
$(BIN)/pip install -e .
touch $(VENV)
.PHONY: test
test: $(VENV)
$(BIN)/pytest
.PHONY: mypy
mypy: $(VENV)
$(BIN)/mypy
.PHONY: lint
lint: $(VENV)
$(BIN)/flake8
.PHONY: release
release: $(VENV)
rm -rf dist
$(BIN)/python setup.py sdist bdist_wheel
$(BIN)/twine upload dist/*
VERSION = $(shell python3 setup.py --version)
tarball:
git archive --output=../dotenv-cli_$(VERSION).orig.tar.gz HEAD
.PHONY: clean
clean:
rm -rf build dist *.egg-info
rm -rf $(VENV)
find . -type f -name *.pyc -delete
find . -type d -name __pycache__ -delete
# coverage
rm -rf htmlcov .coverage
rm -rf .mypy_cache
rm -rf .pytest_cache