From 6a1ba7b427f4c170e4d05ad70b112fbf376352d6 Mon Sep 17 00:00:00 2001 From: Marcos Pereira Date: Wed, 24 Oct 2018 23:57:06 -0300 Subject: [PATCH] Configured pipeline for release new version. --- README.md | 1 + bin/deploy.sh | 13 +++++++++++++ bitbucket-pipelines.yml | 15 ++++++++------- 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 bin/deploy.sh diff --git a/README.md b/README.md index 7974338..990ef71 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ The documentation for python-keycloak is available on [readthedocs](http://pytho * [njordr](https://bitbucket.org/njordr/) * [Josha Inglis](https://bitbucket.org/joshainglis/) * [Alex](https://bitbucket.org/alex_zel/) +* [Ewan Jone](https://bitbucket.org/kisamoto/) ## Usage diff --git a/bin/deploy.sh b/bin/deploy.sh new file mode 100644 index 0000000..98db823 --- /dev/null +++ b/bin/deploy.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +cat << EOF > /root/.pypirc +[distutils] +index-servers=pypi + +[pypi] +repository=https://upload.pypi.org/legacy/ +username=${PYPI_USERNAME} +password=${PYPI_PASSWORD} +EOF + +python setup.py sdist upload -r pypi \ No newline at end of file diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index d2ef1e5..b29229a 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1,8 +1,3 @@ -# This is a sample build configuration for Python. -# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples. -# Only use spaces to indent your .yml configuration. -# ----- -# You can specify a custom docker image from Docker Hub as your build environment. image: python:3.7 pipelines: @@ -11,6 +6,12 @@ pipelines: name: Tests caches: - pip - script: # Modify the commands below to build your repository. + script: - pip install -r requirements.txt - - python3 -m unittest discover \ No newline at end of file + - python3 -m unittest discover + tags: + '*': + - step: + name: Release New Verison + script: + - ./bin/deploy.sh \ No newline at end of file