diff --git a/Scrapy-release-procedure.md b/Scrapy-release-procedure.md index e32bcb1..a2bf252 100644 --- a/Scrapy-release-procedure.md +++ b/Scrapy-release-procedure.md @@ -2,29 +2,33 @@ This page outlines the procedure used to release a new (major/minor) version of Scrapy. Micro/patch versions are published automatically. +You will need [bumpversion](https://pypi.python.org/pypi/bumpversion) installed. + ## Version and git branch -Here is an example, assuming we are releasing 0.20.0: +Here is an example, assuming we are releasing 0.26.0: ```bash -$ git checkout -b 0.22 master -# edit scrapy/VERSION and modify version to 0.22.0 -# edit docs/news.rst and set release date for 0.22 -$ git commit -a -m "bumped version to 0.22.0" -$ git tag -a -m "version 0.22.0" 0.22.0 -$ git push origin 0.22 --tags +# Be sure your local master branch is uptodate with remote master branch. +$ git pull origin --rebase -$ git checkout master -# edit scrapy/VERSION and modify version to 0.23.0 -$ git commit -a -m "bumped version to 0.23.0" -$ git tag -a -m "version 0.23.0" 0.23.0 -$ git push origin master --tags +# Update release notes by editing docs/news.rst (Don't forget to set release date) +$ git add docs/news.rst +$ git commit -m 'Add 0.26.0 release notes' + +# Increase version and create featured branch +$ bumpversion minor +$ git branch 0.26 +$ bumpversion minor --no-tag + +# Review everything and push when sure. +$ git push origin master 0.26 --tags ``` +**IMPORTANT** Do not tag development versions (like 0.25.0), they will be uploaded to pypi by travis-ci. ## Buildbot * Update buildbot configuration to point to the new stable release - * Update buildbot to publish the new version to PyPI, and disable the old one ## Read the Docs @@ -47,27 +51,20 @@ $ git push origin master --tags ## Micro/bugfix releases -Assuming we are releasing `0.22.2`: +Assuming we are releasing `0.24.1`: ```bash -$ git checkout 0.22 - -# Edit `scrapy/VERSION` and modify version to `0.22.2` -$ git add scrapy/VERSION -$ git commit -m "bumped version to 0.22.2" +$ git checkout 0.24 +$ bumpversion patch # Add version, release date and changes to `docs/news.rst` $ git log '--format=- %s (:commit:`%h`)' 0.22.1...0.22 # update docs/news.rst $ git add docs/news.rst -$ git commit -m 'Add 0.22.2 release notes' - -# Tag and push -$ git tag -a -m "version 0.22.2" 0.22.2 -$ git push origin 0.22 --tags -# It triggers scrapy-0.22 builder and publish pypi sources and debian packages automatically +$ git commit -m 'Add 0.24.1 release notes' +$ git push origin 0.24 --tags # Checkout master and cherry pick `docs/news.rst` changes. $ git checkout master -$ git cherry-pick 0.22 # resolve any conflicts on docs/news.rst +$ git cherry-pick 0.24 # resolve any conflicts on docs/news.rst $ git push origin master ```