From 912ec41f9f1379dbcaf0cc65119d4f44609795a8 Mon Sep 17 00:00:00 2001 From: Michael Haas Date: Fri, 3 Jul 2020 10:58:50 +0200 Subject: [PATCH 1/2] Document release process --- docs/source/index.rst | 1 + docs/source/release_process.rst | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 docs/source/release_process.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index d703094..15ef618 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -124,6 +124,7 @@ Table of Contents retry.rst security.rst + release_process.rst diff --git a/docs/source/release_process.rst b/docs/source/release_process.rst new file mode 100644 index 0000000..35ff8e4 --- /dev/null +++ b/docs/source/release_process.rst @@ -0,0 +1,45 @@ +Creating a new Release of the SDK +================================== + +*This document describes how to publish a new release of the SDK +to `pypi.org`_ and is not applicable to simple use of the SDK.* + +To create a new release of the Data Attribute Recommendation Python SDK and +publish it to `pypi.org`_, follow these steps: + +- Update `version.txt`_ with the desired version number +- Update the `CHANGELOG.md`_ + + - Add a new heading with the new version number below *[Unreleased]* + - The heading for the new version number should be a link to the + (non-existing) tag on Github + - *[Unreleased]* becomes an empty section + - Update the tag used in the URL for *[Unreleased]* to the new version number + so that *[Unreleased]* points to the changes between the new version + and whatever is pushed to master afterwards + +- Merge the updated `version.txt`_ and `CHANGELOG.md`_ to master +- Create a tag against the latest master with the desired version number + and push the tag. This triggers the build and deploy on Travis. + +.. code-block:: shell + + $ git pull + $ git tag -a rel/x.y.z -m "Tagging release x.y.z" + $ git push --tags + +- A new build for the tag should appear to `Travis`_. Once the *deploy* stage + has run successfully, the new version should be available on `pypi.org`_. +- The documentation on `Read The Docs`_ is automatically updated. A new version + based on the git tag is also added. Note that the default documentation version + displayed to visitors is always *latest* and is built from *master* on any update + to the *master* branch. + + + + +.. _pypi.org: https://pypi.org/project/data-attribute-recommendation-sdk/ +.. _version.txt: https://github.com/SAP/data-attribute-recommendation-python-sdk/blob/master/version.txt +.. _CHANGELOG.md: https://github.com/SAP/data-attribute-recommendation-python-sdk/blob/master/CHANGELOG.md +.. _Travis: https://travis-ci.com/github/SAP/data-attribute-recommendation-python-sdk +.. _Read The Docs: https://data-attribute-recommendation-python-sdk.readthedocs.io/ \ No newline at end of file From b3e1fd3e45a628640759b06507ef3ce940b13585 Mon Sep 17 00:00:00 2001 From: Michael Haas Date: Fri, 3 Jul 2020 11:14:44 +0200 Subject: [PATCH 2/2] Clarify permissions required for release --- docs/source/release_process.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/source/release_process.rst b/docs/source/release_process.rst index 35ff8e4..5585e2b 100644 --- a/docs/source/release_process.rst +++ b/docs/source/release_process.rst @@ -1,11 +1,14 @@ -Creating a new Release of the SDK -================================== +Creating a new release of the Data Attribute Recommendation SDK +=============================================================== *This document describes how to publish a new release of the SDK -to `pypi.org`_ and is not applicable to simple use of the SDK.* +to `pypi.org`_ and does not apply to simple use of the SDK.* To create a new release of the Data Attribute Recommendation Python SDK and -publish it to `pypi.org`_, follow these steps: +publish it to `pypi.org`_, you will need to have *Write* access to the +`GitHub repository`_. + +Follow these steps to create a release: - Update `version.txt`_ with the desired version number - Update the `CHANGELOG.md`_ @@ -22,6 +25,9 @@ publish it to `pypi.org`_, follow these steps: - Create a tag against the latest master with the desired version number and push the tag. This triggers the build and deploy on Travis. + - No special permissions for pypi.org are required. Travis has access + to a token which grants permission to publish to `pypi.org`. + .. code-block:: shell $ git pull @@ -37,7 +43,7 @@ publish it to `pypi.org`_, follow these steps: - +.. _GitHub repository: https://github.com/SAP/data-attribute-recommendation-python-sdk .. _pypi.org: https://pypi.org/project/data-attribute-recommendation-sdk/ .. _version.txt: https://github.com/SAP/data-attribute-recommendation-python-sdk/blob/master/version.txt .. _CHANGELOG.md: https://github.com/SAP/data-attribute-recommendation-python-sdk/blob/master/CHANGELOG.md