From: Florimond Manca Date: Sat, 21 Sep 2019 07:12:53 +0000 (+0200) Subject: Document the release process (#363) X-Git-Tag: 0.7.4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12752466ae9f4dec2e4788ae25af6ebd407f6795;p=thirdparty%2Fhttpx.git Document the release process (#363) * Document release process * Update changelog instructions w/ ref to keepachangelog * Prettify bullet points * Add docs deploy to release script --- diff --git a/docs/contributing.md b/docs/contributing.md index 15eadcd1..d44c03c3 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -114,3 +114,22 @@ To spawn the docs server run: ```shell $ mkdocs serve ``` + +## Releasing + +*This section is targeted at HTTPX maintainers.* + +Before releasing a new version, create a pull request that includes: + +- **An update to the changelog**: + - We follow the format from [keepachangelog](https://keepachangelog.com/en/1.0.0/). + - [Compare](https://github.com/encode/httpx/compare/) `master` with the tag of the latest release, and list all entries that are of interest to our users: + - Things that **must** go in the changelog: added, changed, deprecated or removed features, and bug fixes. + - Things that **should not** go in the changelog: changes to documentation, tests or tooling. + - Try sorting entries in descending order of impact / importance. + - Keep it concise and to-the-point. 🎯 +- **A version bump**: see `__version__.py`. + +For an example, see [#362](https://github.com/encode/httpx/pull/362). + +Once the release PR is merged, run `$ scripts/publish` to publish the new release to PyPI. diff --git a/scripts/publish b/scripts/publish index 4fcc734c..16cbf689 100755 --- a/scripts/publish +++ b/scripts/publish @@ -15,11 +15,18 @@ if ! command -v "${PREFIX}twine" &>/dev/null ; then exit 1 fi +if ! command -v "${PREFIX}mkdocs" &>/dev/null ; then + echo "Unable to find the 'mkdocs' command." + echo "Install from PyPI, using '${PREFIX}pip install mkdocs'." + exit 1 +fi + find ${PACKAGE} -type f -name "*.py[co]" -delete find ${PACKAGE} -type d -name __pycache__ -delete ${PREFIX}python setup.py sdist ${PREFIX}twine upload dist/* +${PREFIX}mkdocs gh-deploy echo "You probably want to also tag the version now:" echo "git tag -a ${VERSION} -m 'version ${VERSION}'"