-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
if ! git rev-parse `python setup.py --version` 2>/dev/null ; then | ||
git tag `python setup.py --version` | ||
git push --tags # update the repository version | ||
python setup.py bdist_wheel # build this package in the dist directory | ||
twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD # publish | ||
else | ||
echo "No deployment - Only non-functional elements were modified in this change" | ||
if [ $PY_VERSION = "2" ]; then | ||
if ! git rev-parse `python setup.py --version` 2>/dev/null ; then | ||
git tag `python setup.py --version` | ||
git push --tags # update the repository version | ||
python setup.py bdist_wheel # build this package in the dist directory | ||
twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD # publish | ||
else | ||
echo "No deployment - Only non-functional elements were modified in this change" | ||
fi | ||
fi | ||
|
||
if [ $PY_VERSION = "3" ]; then | ||
python setup.py bdist_wheel # build this package in the dist directory | ||
if ! twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD; then # publish | ||
echo "Could not upload this package version on Pypi. This usually means that the version already exists, and that only non-functional elements were modified in this change. If this it not the case, check the error message above." | ||
fi | ||
fi |