Skip to content

Commit

Permalink
Automate the release process for the Python client
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwlchan committed Oct 19, 2020
1 parent d92ef85 commit dc60eee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
19 changes: 1 addition & 18 deletions python_client/README.rst
Expand Up @@ -6,24 +6,7 @@ This is a client for the `Wellcome Storage Service <https://github.com/wellcomet
Uploading a new version
***********************

To upload a new version:

1. Bump the version in ``src/wellcome_storage_service/version.py``.

2. Add a changelog entry in ``CHANGELOG.md``.

3. Create a new package for PyPI by running::

cd /repos/storage-service/python_client
python setup.py sdist

4. Upload the new package to PyPI by running::

twine upload dist/wellcome_storage_service-<version>.tar.gz

5. Enter the PyPI username (``wellcomedigitalplatform``) and password (see Keybase).

6. Celebrate your new release. 🎉✨
To upload a new version, run the ``release.sh`` script that lives with the source code for this library.

Python 2.7 support
******************
Expand Down
18 changes: 18 additions & 0 deletions python_client/release.sh
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o verbose

rm -rf dist

python3 setup.py sdist

PYPI_USERNAME="wellcomedigitalplatform"
PYPI_PASSWORD="$(
AWS_PROFILE=platform-dev \
aws secretsmanager get-secret-value --secret-id builds/pypi_password | \
jq -r '.SecretString'
)"

twine upload dist/* --username="$PYPI_USERNAME" --password="$PYPI_PASSWORD"

0 comments on commit dc60eee

Please sign in to comment.