Commit 35eebdb6 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added auto-deploy to PyPI; revised badges.

updated __version__ and __versionalias__
parent 112a039f
Pipeline #362 failed with stages
in 1 minute and 1 second
before_script: before_script:
- git lfs pull - git lfs pull
# Advise GitLab that these environment vars should be loaded from the Variables config.
variables:
PYPI_USER: SECURE
PYPI_PASSWORD: SECURE
stages:
- test
- deploy_pages
- deploy_to_pypi
- cleanup
test_py_tools_ds: test_py_tools_ds:
stage: test
script: script:
- source /root/anaconda3/bin/activate - source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal - export GDAL_DATA=/root/anaconda3/share/gdal
...@@ -13,8 +28,9 @@ test_py_tools_ds: ...@@ -13,8 +28,9 @@ test_py_tools_ds:
- htmlcov/ - htmlcov/
- docs/_build/html/ - docs/_build/html/
pages: pages:
stage: deploy stage: deploy_pages
dependencies: dependencies:
- test_py_tools_ds - test_py_tools_ds
script: script:
...@@ -29,3 +45,28 @@ pages: ...@@ -29,3 +45,28 @@ pages:
expire_in: 30 days expire_in: 30 days
only: only:
- master - master
deploy_pypi:
stage: deploy_to_pypi
dependencies:
- test_py_tools_ds
script: # Configure the PyPI credentials, then push the package, and cleanup the creds.
- source /root/anaconda3/bin/activate
- printf "[distutils]\nindex-servers =\n pypi\n\n" >> ~/.pypirc
- printf "[pypi]\n""repository:"" https://upload.pypi.org/legacy/\n" >> ~/.pypirc
- printf "username= ${PYPI_USER}\n" >> ~/.pypirc
- printf "password= ${PYPI_PASSWORD}\n" >> ~/.pypirc
- python setup.py check sdist upload -r pypi # This will fail if your creds are bad.
- echo "" > ~/.pypirc && rm ~/.pypirc # If the above fails, this won't run.
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- dev
cleanup_pypirc:
stage: cleanup
when: always # this is important; run even if preceding stages failed.
script:
- rm -vf ~/.pypirc # we don't want to leave these around, but GitLab may clean up anyway.
...@@ -12,9 +12,6 @@ A collection of Python tools by Daniel Scheffler. ...@@ -12,9 +12,6 @@ A collection of Python tools by Daniel Scheffler.
Status Status
------ ------
.. .. image:: https://img.shields.io/pypi/v/py_tools_ds.svg
:target: https://pypi.python.org/pypi/py_tools_ds
.. .. image:: https://img.shields.io/travis/danschef/py_tools_ds.svg .. .. image:: https://img.shields.io/travis/danschef/py_tools_ds.svg
:target: https://travis-ci.org/danschef/py_tools_ds :target: https://travis-ci.org/danschef/py_tools_ds
...@@ -27,7 +24,11 @@ Status ...@@ -27,7 +24,11 @@ Status
:alt: Updates :alt: Updates
.. image:: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/badges/master/build.svg .. image:: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/badges/master/build.svg
:target: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/commits/master
.. image:: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/badges/master/coverage.svg .. image:: https://gitext.gfz-potsdam.de/danschef/py_tools_ds/badges/master/coverage.svg
:target: http://danschef.gitext.gfz-potsdam.de/py_tools_ds/coverage/
.. image:: https://img.shields.io/pypi/v/py_tools_ds.svg
:target: https://pypi.python.org/pypi/py_tools_ds
See also the latest coverage_ report. See also the latest coverage_ report.
......
...@@ -8,8 +8,8 @@ from . import similarity ...@@ -8,8 +8,8 @@ from . import similarity
from . import web from . import web
from .io.raster.GeoArray import GeoArray from .io.raster.GeoArray import GeoArray
__version__ = '0.3.3' __version__ = '0.4.0'
__versionalias__ = '20170703_02' __versionalias__ = '20170705_01'
__author__='Daniel Scheffler' __author__='Daniel Scheffler'
# Validate GDAL version # Validate GDAL version
......
...@@ -17,7 +17,7 @@ test_requirements = requirements + ['coverage'] ...@@ -17,7 +17,7 @@ test_requirements = requirements + ['coverage']
setup( setup(
name='py_tools_ds', name='py_tools_ds',
version='0.3.3', version='0.4.0',
description="A collection of Python tools by Daniel Scheffler.", description="A collection of Python tools by Daniel Scheffler.",
long_description=readme + '\n\n' + history, long_description=readme + '\n\n' + history,
author="Daniel Scheffler", author="Daniel Scheffler",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment