improve pre-release checks
Browse files
Makefile
CHANGED
@@ -4,14 +4,19 @@ help:
|
|
4 |
@echo "clean-pyc - remove Python file artifacts"
|
5 |
@echo "install - install the package to the active Python's site-packages"
|
6 |
|
7 |
-
|
8 |
pip install pipenv
|
9 |
pipenv install --dev
|
|
|
|
|
10 |
pipenv run flake8
|
11 |
pipenv run black pytube --diff
|
|
|
12 |
pipenv run mypy pytube
|
13 |
pipenv run pytest --cov-report term-missing --cov=pytube
|
14 |
|
|
|
|
|
15 |
clean: clean-build clean-pyc
|
16 |
|
17 |
clean-build:
|
@@ -28,6 +33,7 @@ clean-pyc:
|
|
28 |
find . -name '*~' -exec rm -f {} +
|
29 |
find . -name '__pycache__' -exec rm -fr {} +
|
30 |
find . -name '.pytest_cache' -exec rm -fr {} +
|
|
|
31 |
|
32 |
install: clean
|
33 |
python setup.py install
|
@@ -39,7 +45,8 @@ upload:
|
|
39 |
twine upload dist/*
|
40 |
|
41 |
tag:
|
|
|
42 |
git tag "v`pipenv run python pytube/version.py`"
|
43 |
git push --tags
|
44 |
|
45 |
-
release: tag package upload
|
|
|
4 |
@echo "clean-pyc - remove Python file artifacts"
|
5 |
@echo "install - install the package to the active Python's site-packages"
|
6 |
|
7 |
+
pipenv:
|
8 |
pip install pipenv
|
9 |
pipenv install --dev
|
10 |
+
|
11 |
+
test:
|
12 |
pipenv run flake8
|
13 |
pipenv run black pytube --diff
|
14 |
+
pipenv run black tests --diff
|
15 |
pipenv run mypy pytube
|
16 |
pipenv run pytest --cov-report term-missing --cov=pytube
|
17 |
|
18 |
+
ci: pipenv test
|
19 |
+
|
20 |
clean: clean-build clean-pyc
|
21 |
|
22 |
clean-build:
|
|
|
33 |
find . -name '*~' -exec rm -f {} +
|
34 |
find . -name '__pycache__' -exec rm -fr {} +
|
35 |
find . -name '.pytest_cache' -exec rm -fr {} +
|
36 |
+
find . -name '.mypy_cache' -exec rm -fr {} +
|
37 |
|
38 |
install: clean
|
39 |
python setup.py install
|
|
|
45 |
twine upload dist/*
|
46 |
|
47 |
tag:
|
48 |
+
git diff-index --quiet HEAD -- # checks for unstaged/uncomitted files
|
49 |
git tag "v`pipenv run python pytube/version.py`"
|
50 |
git push --tags
|
51 |
|
52 |
+
release: clean test tag clean-pyc package upload
|