Skip to content

Commit

Permalink
Merge pull request #30 from hjacobs/master
Browse files Browse the repository at this point in the history
Add release.sh helper script to build and release to PyPI
  • Loading branch information
jmcs committed Jul 7, 2015
2 parents 09f36ca + 97e50d3 commit c9995ae
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 13 deletions.
32 changes: 20 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Connexion
=========

.. image:: https://travis-ci.org/zalando/connexion.svg?branch=master
:target: https://travis-ci.org/zalando/connexion
:alt: Travis CI build status

.. image:: https://coveralls.io/repos/zalando/connexion/badge.svg?branch=master
:target: https://coveralls.io/r/zalando/connexion?branch=master
:alt: Coveralls status

.. image:: https://img.shields.io/pypi/v/connexion.svg
:target: https://pypi.python.org/pypi/connexion
:alt: Latest Version
Expand All @@ -14,18 +25,6 @@
:target: https://github.com/zalando/connexion/blob/master/LICENSE
:alt: License

.. image:: https://travis-ci.org/zalando/connexion.svg?branch=master
:target: https://travis-ci.org/zalando/connexion
:alt: Travis CI build status

.. image:: https://coveralls.io/repos/zalando/connexion/badge.svg?branch=master
:target: https://coveralls.io/r/zalando/connexion?branch=master
:alt: Coveralls status


Connexion
=========

Connexion is a framework on top of Flask_ to automagically handle your REST API requests
based on `Swagger 2.0 Specification <swagger.spec_>`_ files
in YAML.
Expand Down Expand Up @@ -143,6 +142,15 @@ to ``tornado``:
app = connexion.App(__name__, port = 8080, specification_dir='swagger/', server='tornado')
Releasing Connexion
===================

Build and upload new version to PyPI:

.. code-block:: bash
$ ./release.sh <NEW-VERSION>
License
-------
Copyright 2015 Zalando SE
Expand Down
28 changes: 28 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

if [ $# -ne 1 ]; then
>&2 echo "usage: $0 <version>"
exit 1
fi

set -xe

python3 --version
git --version

version=$1

sed -i "s/version = .*/version = '${version}'/" setup.py
python3 setup.py clean
python3 setup.py test
python3 setup.py flake8

git add setup.py

git commit -m "Bumped version to $version"
git push

python3 setup.py sdist bdist_wheel upload

git tag ${version}
git push --tags
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

version = '0.6.0'
version = '0.6.1'


class PyTest(TestCommand):
Expand Down

0 comments on commit c9995ae

Please sign in to comment.