|
| 1 | +# Releasing a pylint version |
| 2 | + |
| 3 | +So, you want to release the ``X.Y.Z`` version of pylint ? |
| 4 | + |
| 5 | +## Process |
| 6 | + |
| 7 | +1. Preparation |
| 8 | + 0. Run the acceptance tests to see if everything is alright with this release. |
| 9 | + We don't run them on CI: ``pytest -m acceptance`` |
| 10 | + 1. Check if the dependencies of the package are correct |
| 11 | + 2. Update the version number in ``__pkginfo__`` |
| 12 | + 3. Put the version numbers, and the release date into the changelog |
| 13 | + 4. Put the release date into the ``What's new`` section. |
| 14 | + 5. Generate the new copyright notices for this release: |
| 15 | + |
| 16 | +```bash |
| 17 | +pip3 install copyrite |
| 18 | +copyrite --contribution-threshold 1 --change-threshold 3 --backend-type |
| 19 | + git --aliases=.copyrite_aliases . --jobs=8 |
| 20 | +# During the commit pre-commit and pyupgrade will remove the encode utf8 |
| 21 | +# automatically |
| 22 | +``` |
| 23 | + |
| 24 | + 6. Submit your changes in a merge request. |
| 25 | + |
| 26 | +2. Make sure the tests are passing on Travis/GithubActions: |
| 27 | + https://travis-ci.org/PyCQA/pylint/ |
| 28 | + |
| 29 | +3. Do the actual release by tagging the master with ``pylint-X.Y.Z`` (ie ``pylint-1.6.12`` |
| 30 | + for example). Travis should deal with the release process once the tag is pushed |
| 31 | + with `git push origin --tags` |
| 32 | + |
| 33 | +## Manual Release |
| 34 | + |
| 35 | +Following the previous steps, for a manual release run the following commands: |
| 36 | + |
| 37 | +```bash |
| 38 | +git clean -fdx && find . -name '*.pyc' -delete |
| 39 | +python setup.py sdist --formats=gztar bdist_wheel |
| 40 | +twine upload dist/* |
| 41 | +# don't forget to tag it as well |
| 42 | +``` |
| 43 | + |
| 44 | +## Post release |
| 45 | + |
| 46 | +### New branch to create for major releases |
| 47 | + |
| 48 | +The master branch will have all the new features for the ``X.Y+1`` version |
| 49 | + |
| 50 | +If you're doing a major release, you need to create the ``X.Y`` branch |
| 51 | +where we will cherry-pick bugs to release the ``X.Y.Z+1`` minor versions |
| 52 | + |
| 53 | +### Milestone handling |
| 54 | + |
| 55 | +We move issue that were not done in the next milestone and block release only |
| 56 | +if it's an issue labelled as blocker. |
| 57 | + |
| 58 | +### Files to update after releases |
| 59 | + |
| 60 | +#### Changelog |
| 61 | +Create a new section, with the name of the release ``X.Y.Z+1`` (or ``X.Y+1.0`` for |
| 62 | +major release) and the estimated date when it is going to be published. If |
| 63 | +no date can be known at that time, we should use ``Undefined``. |
| 64 | + |
| 65 | +#### Whatsnew |
| 66 | + |
| 67 | +Only for major release, create a new ``What's new in Pylint X.Y+1`` document |
| 68 | +Take a look at the examples from ``doc/whatsnew``. |
0 commit comments