aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/doing-a-release.rst27
-rw-r--r--docs/index.rst1
-rw-r--r--tasks.py27
3 files changed, 55 insertions, 0 deletions
diff --git a/docs/doing-a-release.rst b/docs/doing-a-release.rst
new file mode 100644
index 00000000..81349a70
--- /dev/null
+++ b/docs/doing-a-release.rst
@@ -0,0 +1,27 @@
+Doing a Release
+===============
+
+Doing a release of ``cryptography`` is a two part process.
+
+Bumping the version number
+--------------------------
+
+The first step in doing a release is bumping the version number in the
+software.
+
+* Update the version number in ``cryptography/__about__.py`` and
+ ``docs/conf.py``.
+* Do a commit indicating this.
+* Send a pull request with this.
+* Wait for it to be merged.
+
+Performing the release
+----------------------
+
+The commit which merged the version number bump is now the official release
+commit for this release. Once this has happened:
+
+* Run ``invoke release {version}``.
+
+That's all, the release should now be available on PyPI and a tag should be
+available in the repository.
diff --git a/docs/index.rst b/docs/index.rst
index 9682337c..4bbfe7fd 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -79,4 +79,5 @@ The ``cryptography`` open source project
contributing
security
api-stability
+ doing-a-release
community
diff --git a/tasks.py b/tasks.py
new file mode 100644
index 00000000..5fe28718
--- /dev/null
+++ b/tasks.py
@@ -0,0 +1,27 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from __future__ import absolute_import, division, print_function
+
+import invoke
+
+
+@invoke.task
+def release(version):
+ """
+ ``version`` should be a string like '0.4' or '1.0'.
+ """
+ invoke.run("git tag -s {}".format(version))
+ invoke.run("git push --tags")
+
+ invoke.run("python setup.py sdist bdist_wheel")
+ invoke.run("twine upload -s dist/cryptography-{}*".format(version))