aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-01-06 15:52:38 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-01-06 15:52:38 -0800
commit89063f687893417e1e5dac2e854a02d92037b6a0 (patch)
treea4c4c3610a55ed4efb78575140b458fc7134007b
parent8755dbd309ae4eab754385853ac6959bfade588d (diff)
downloadcryptography-89063f687893417e1e5dac2e854a02d92037b6a0.tar.gz
cryptography-89063f687893417e1e5dac2e854a02d92037b6a0.tar.bz2
cryptography-89063f687893417e1e5dac2e854a02d92037b6a0.zip
Update procedure
-rw-r--r--docs/doing-a-release.rst27
-rw-r--r--docs/index.rst1
-rw-r--r--tasks.py26
3 files changed, 28 insertions, 26 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 5eb3de7d..24d6d204 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -78,4 +78,5 @@ The ``cryptography`` open source project
contributing
security
api-stability
+ doing-a-release
community
diff --git a/tasks.py b/tasks.py
index dba760ca..5fe28718 100644
--- a/tasks.py
+++ b/tasks.py
@@ -12,40 +12,14 @@
# limitations under the License.
from __future__ import absolute_import, division, print_function
-import os
-import re
-
import invoke
-def update_version(filename, identifier, version):
- path = os.path.join(os.path.dirname(__file__), filename)
- with open(path) as f:
- contents = f.read()
- contents = re.sub(
- r"^{} = .*?$".format(identifier),
- '{} = "{}"'.format(identifier, version),
- contents,
- flags=re.MULTILINE
- )
- with open(path, "w") as f:
- f.write(contents)
-
-
@invoke.task
def release(version):
"""
``version`` should be a string like '0.4' or '1.0'.
"""
- # This checks for changes in the repo.
- invoke.run("git diff-index --quiet HEAD")
-
- update_version("cryptography/__about__.py", "__version__", version)
- update_version("docs/conf.py", "version", version)
- update_version("docs/conf.py", "release", version)
-
- invoke.run("git commit -am 'Bump version numbers for release.'")
- invoke.run("git push")
invoke.run("git tag -s {}".format(version))
invoke.run("git push --tags")