mirror of https://github.com/scrapy/scrapy.git
Updated Scrapy release procedure (markdown)
parent
1c12925e17
commit
ac9a1ac95c
|
|
@ -1,110 +1,119 @@
|
|||
# Scrapy Release Procedure
|
||||
|
||||
This page outlines the procedure used to release a new (major/minor) version of Scrapy. Micro/patch versions are published automatically.
|
||||
This page outlines the procedure used to release a new version of Scrapy.
|
||||
|
||||
You will need [bumpversion](https://pypi.python.org/pypi/bumpversion) installed.
|
||||
|
||||
## Release notes
|
||||
|
||||
First the release notes page of the documentation must be udpated to include an
|
||||
entry for the new version. Do this in the target branch, which will be `master`
|
||||
if you are releasing a major or minor version, or a version-specific branch in
|
||||
case of a patch version.
|
||||
|
||||
A pull request for this can be created at any point, to allow for discussions,
|
||||
and updated as new changes are accepted into the target branch. Once the code
|
||||
is frozen and the release date set, the pull request can be updated accordingly
|
||||
and merged into the target branch.
|
||||
|
||||
## Version and git branch
|
||||
|
||||
Here is an example, assuming we are releasing 1.1.0rc1:
|
||||
**Note:** The code below assumes that the Scrapy repository is configured as
|
||||
the `upstream` remote in your local clone, which you can do with:
|
||||
`git remote add upstream https://github.com/scrapy/scrapy.git`
|
||||
|
||||
If you are releasing major version `1.0.0`:
|
||||
|
||||
```bash
|
||||
# Be sure your local master branch is uptodate with remote master branch.
|
||||
$ git pull origin --rebase
|
||||
|
||||
# Update release notes by editing docs/news.rst
|
||||
$ git add docs/news.rst
|
||||
$ git commit -m 'Add 1.1.0 release notes'
|
||||
|
||||
# Increase version and create featured branch
|
||||
# master: 1.1.0dev1 to 1.1.0rc1
|
||||
$ bumpversion prerel
|
||||
$ git branch 1.1
|
||||
# master: 1.1.0rc1 to 1.2.0dev1
|
||||
$ bumpversion minor --no-tag
|
||||
|
||||
# Review everything and push when sure.
|
||||
$ git push origin master 1.1 --tags
|
||||
git checkout master
|
||||
git pull --ff-only upstream master
|
||||
git log -1 # Check that the last commit is the release notes update
|
||||
bumpversion major
|
||||
git checkout -b 1.0
|
||||
git push upstream master 1.0 --tags
|
||||
```
|
||||
|
||||
To make an official release from a release candidate:
|
||||
If you are releasing minor version `1.2.0`:
|
||||
|
||||
```bash
|
||||
# Checkout the featured branch.
|
||||
$ git checkout 1.1
|
||||
|
||||
# Set release date in docs/news.rst.
|
||||
$ git add docs/news.rst
|
||||
$ git commit -m 'Update 1.1.0 release date'
|
||||
|
||||
# Increase version.
|
||||
# 1.1: 1.1.0rc1 to 1.1.0
|
||||
$ bumpversion prerel
|
||||
|
||||
# Review everything and push when sure.
|
||||
$ git push origin master 1.1 --tags
|
||||
|
||||
# Checkout master and cherry pick `docs/news.rst` changes.
|
||||
$ git checkout master
|
||||
$ git cherry-pick 1.1 # resolve any conflicts on docs/news.rst
|
||||
$ git push origin master
|
||||
git checkout master
|
||||
git pull --ff-only upstream master
|
||||
git log -1 # Check that the last commit is the release notes update
|
||||
bumpversion minor
|
||||
git checkout -b 1.2
|
||||
git push upstream master 1.2 --tags
|
||||
```
|
||||
|
||||
## Buildbot
|
||||
If you are releasing patch version `1.2.3`:
|
||||
|
||||
* Update buildbot configuration to point to the new stable release
|
||||
```bash
|
||||
git checkout 1.2
|
||||
git pull --ff-only upstream 1.2
|
||||
git log -1 # Check that the last commit is the release notes update
|
||||
bumpversion patch
|
||||
git push upstream 1.2 --tags
|
||||
```
|
||||
|
||||
## Python Package Index
|
||||
|
||||
New Scrapy versions are automatically deployed on the Python Package Index
|
||||
through Travis CI.
|
||||
|
||||
## Read the Docs
|
||||
|
||||
* Enable the new version to be built in readthedocs
|
||||
* Set the new version as default
|
||||
|
||||
## Github release
|
||||
|
||||
Create a Github release entry, with a description including the highlights from
|
||||
the release notes and a link to the release notes of the new version in Read
|
||||
the Docs.
|
||||
|
||||
## scrapy.org website
|
||||
|
||||
* Update [scrapy versions](https://github.com/scrapy/scrapy.github.io/blob/master/_data/scrapy.yml)
|
||||
Update [scrapy versions](https://github.com/scrapy/scrapy.github.io/blob/master/_data/scrapy.yml)
|
||||
|
||||
## Send announcement
|
||||
## Send announcements
|
||||
|
||||
* announce in:
|
||||
* [Tweet](https://twitter.com/ScrapyProject)
|
||||
* [scrapy-users group](https://groups.google.com/group/scrapy-users)
|
||||
* change `#scrapy` IRC channel topic:
|
||||
* `/msg ChanServ topic #scrapy Welcome to Scrapy - Say "Hi!" and ask. Latest stable release is Scrapy 0.24.4 - Easy tasks http://git.io/VpGt-w`
|
||||
* Leave a message in the `#scrapy` IRC channel with a link to the release
|
||||
notes
|
||||
|
||||
## Micro/bugfix releases
|
||||
* [Submit a link entry to the Scrapy subreddit](https://www.reddit.com/r/scrapy/submit)
|
||||
that links to the release notes.
|
||||
|
||||
Assuming we are releasing `1.0.2`:
|
||||
* Tweet from [@ScrapyProject](https://twitter.com/ScrapyProject) with a link
|
||||
to the release notes.
|
||||
|
||||
```bash
|
||||
$ git checkout 1.0
|
||||
# 1.0: 1.0.1 to 1.0.2 (Use --serialize to avoid the 1.0.2dev1 version)
|
||||
$ bumpversion patch --serialize "{major}.{minor}.{patch}"
|
||||
## Update Conda packages
|
||||
|
||||
# Add version, release date and changes to `docs/news.rst`
|
||||
$ git log '--format=- %s (:commit:`%h`)' 1.0.1...1.0 # update docs/news.rst
|
||||
$ git add docs/news.rst
|
||||
$ git commit -m 'Add 1.0.2 release notes'
|
||||
$ git push origin 1.0 --tags
|
||||
Create a pull request in https://github.com/conda-forge/scrapy-feedstock
|
||||
against `master` which updates
|
||||
[recipe/meta.yaml](https://github.com/conda-forge/scrapy-feedstock/blob/master/recipe/meta.yaml)
|
||||
as follows:
|
||||
|
||||
# Checkout master and cherry pick `docs/news.rst` changes.
|
||||
$ git checkout master
|
||||
$ git cherry-pick 1.0 # resolve any conflicts on docs/news.rst
|
||||
$ git push origin master
|
||||
```
|
||||
1. Update the `version` string.
|
||||
|
||||
## Conda packages
|
||||
2. Update the `sha256sum` from the PyPI's [source release
|
||||
tarball](https://pypi.org/project/Scrapy/#files).
|
||||
|
||||
The recipe is located here: https://github.com/conda-forge/scrapy-feedstock/tree/master/recipe
|
||||
The procedure is through PRs from a fork against the master branch.
|
||||
3. Reset the `build/number` to `0`. This number is only increased when we
|
||||
re-build a package with no version change.
|
||||
|
||||
The PR will trigger builds in Travis CI, Circle CI and Appveyor. This may take a while depending on the conda-forge build queue. Once builds are OK, the PR is ready to merge and packages will be uploaded to the `conda-forge` channel automatically.
|
||||
4. Update the requirements if needed. This can be done by checking the
|
||||
requirements declared in `setup.py`.
|
||||
|
||||
Checklist for new releases:
|
||||
The pull request will trigger builds in Travis CI, Circle CI and Appveyor. This
|
||||
may take a while depending on the conda-forge build queue. Once builds are OK,
|
||||
the pull request is ready to merge and packages will be uploaded to the
|
||||
`conda-forge` channel automatically.
|
||||
|
||||
1. Update the ``version`` string.
|
||||
2. Update the ``sha256sum`` from the PyPI's [source release
|
||||
tarball](https://pypi.org/project/Scrapy/#files).
|
||||
3. Reset the ``build/number`` to ``0``. This number is only increased when we
|
||||
re-build a package with no version change.
|
||||
4. Update requirements if needed. This can be done by checking the requirements declared in ``setup.py``.
|
||||
5. Do a test build locally to ensure everything is OK.
|
||||
6. Create a branch in your own fork and submit the PR.
|
||||
## Merge into master
|
||||
|
||||
If you’ve released a patch version, you should create a pull request to merge
|
||||
the branch changes back into `master`.
|
||||
|
||||
Because the branch includes version-bumping commits that must not be merged
|
||||
into master, you will need to create a pull request forked from `master` and
|
||||
use cherry-pick to include only required commits. Using `git rebase` to drop
|
||||
undesired commits may also work.
|
||||
|
|
|
|||
Loading…
Reference in New Issue