diff options
Diffstat (limited to 'release.sh')
-rwxr-xr-x | release.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..02a90f1 --- /dev/null +++ b/release.sh | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | [ -e .release ] && rm -rf .release | ||
4 | mkdir .release | ||
5 | |||
6 | # Setup Python 3 Environment | ||
7 | python3 -m venv .release/py3 | ||
8 | .release/py3/bin/pip install -U pip setuptools virtualenv twine | ||
9 | |||
10 | # Bootstrap Python 2 Environment | ||
11 | .release/py3/bin/virtualenv -p python2 .release/py2 | ||
12 | |||
13 | # Build Python 3 Artifacts | ||
14 | .release/py3/bin/python setup.py bdist_wheel --python-tag py3 | ||
15 | .release/py3/bin/python setup.py sdist | ||
16 | |||
17 | # Build Python 2 Artifacts | ||
18 | .release/py2/bin/python setup.py bdist_wheel --python-tag py2 | ||
19 | |||
20 | # Upload it all | ||
21 | .release/py3/bin/twine upload dist/* | ||
22 | |||
23 | # Cleanup | ||
24 | rm -rf .release | ||