Release a new version

As a maintainer, if you plan to release a new version of Watson, you will find useful information in this page.

Bump a new x.y.z release

Create a new branch:

$ git checkout -b prepare-x.y.z

Edit the following files to describe changes and bump the version number:

  • watson/ update the version number
  • add release notes (see previous releases examples)
  • docs/about/ copy/paste release notes here
  • watson.completion and watson.zsh-completion: generate up-to-date completion script by running make completion-scripts

Then commit your work, tag the release and push everything to GitHub:

$ git add watson/ docs/about/
$ git commit -m 'Bump release to x.y.z'
$ git tag x.y.z
$ git push origin prepare-x.y.z
$ git push origin --tags

Create a new pull request (PR) with the prepare-x.y.z branch. You can safely merge this PR if all tests are green.

Draft a new Watson Release on GitHub with the same release notes.

Push the x.y.z release to PyPI

Checkout the up-to-date master branch:

$ git checkout master
$ git pull --rebase origin master

Now, build the release and submit it to PyPI using twine (you’ll need to be registered as a maintainer of the package):

$ python sdist bdist_wheel
$ twine upload dist/*

Update online documentation

We use mkdocs to generate the online documentation. It must be updated via:

$ mkdocs gh-deploy --clean

Publish the x.y.z release to Homebrew

  • Fork the Homebrew/homebrew-core repository to your personal GitHub account.
  • Get the new release SHA256 checksum by copying it from td-watson Warehouse page (the new PyPI)
  • Update brew formula with the automation command bump-formula-pr:
$ brew bump-formula-pr \
  --url='[...]/td-watson-x.y.z.tar.gz' \

Note: you may also need to update versions of Watson’s dependencies (and related checksum). See Homebrew’s documentation for details.