Skip to content

Commit d8ef0a3

Browse files
committed
prepare pipeline
1 parent 5517dbb commit d8ef0a3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
ifdef PYPI_REPO
2+
TWINE_OPTIONS = --repository $(PYPI_REPO)
3+
endif
4+
5+
ifdef PYPI_API_TOKEN
6+
TWINE_OPTIONS += --username __token__ --password $(PYPI_API_TOKEN)
7+
endif
8+
19
default: help
210

311
help:
@@ -12,8 +20,11 @@ lint:
1220
dist:
1321
python3 setup.py sdist bdist_wheel
1422

15-
publis:
16-
python3 -m twine upload --repository testpypi dist/*
23+
check: dist
24+
twine check dist/*
25+
26+
publish: check
27+
twine upload $(TWINE_OPTIONS) dist/*
1728

1829
clean:
1930
rm -rf build/

0 commit comments

Comments
 (0)