-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 996 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (27 loc) · 996 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
27
28
29
30
31
32
33
34
35
36
37
38
39
VERSION := $(shell head -n 1 nextcode/VERSION)
REPO_URL = https://repo.nextcode.com/artifactory/api/pypi/pypi
# select the most recent file in the dist/ directory
LAST_BUILD = $(shell ls -Art dist/ | tail -n 1)
.PHONY: test cover build release
test:
python3 -m pytest tests/
cover:
python3 -m pytest tests/ --cov=nextcode/ --disable-warnings --junitxml=test-results/pytest.xml
cover-html:
python3 -m pytest tests/ --cov=nextcode/ --disable-warnings --junitxml=test-results/pytest.xml --cov-report=html
build:
python3 setup.py sdist
release:
twine upload --repository-url ${REPO_URL} dist/${LAST_BUILD} -u '${BUILD_USER}' -p '${BUILD_PASS}'
releasepypi:
twine upload --repository-url=https://upload.pypi.org/legacy/ dist/${LAST_BUILD} -u '${BUILD_USER}' -p '${BUILD_PASS}'
clean:
rm -rf dist/
scan:
python3 -m pylint -E nextcode/
mypy nextcode/ --ignore-missing-imports
git-tag:
git tag ${VERSION}
git push origin ${VERSION} -o ci.skip
black:
black --exclude="venv|.tox" .