Debian Codegraph @

docs/release.rst

raw
1 .. _jupyter_console_release:
2
3 Making a release as a maintainer
4 ================================
5
6 This document guides a maintainer through creating a release of the Jupyter
7 console.
8
9 Clean the repository
10 --------------------
11
12 Remove all non-tracked files with:
13
14 .. code:: bash
15
16 git clean -xfdi
17
18 This will ask you for confirmation before removing all untracked files. Make
19 sure the ``dist/`` folder is clean and does not contain any stale builds from
20 previous attempts.
21
22 Create the release
23 ------------------
24
25 #. Set Environment variables
26
27 Set environment variables to document current release version, and git tag:
28
29 .. code:: bash
30
31 VERSION=4.1.0
32
33 #. Update version number in ``jupyter_console/_version.py``. Make sure that
34 a valid `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_ version is
35 being used.
36
37 #. Commit and tag the release with the current version number:
38
39 .. code:: bash
40
41 git commit -am "release $VERSION"
42 git tag $VERSION
43
44 #. You are now ready to build the ``sdist`` and ``wheel``:
45
46 .. code:: bash
47
48 python setup.py sdist --formats=gztar
49 python setup.py bdist_wheel
50
51 #. You can now test the ``wheel`` and the ``sdist`` locally before uploading
52 to PyPI. Make sure to use `twine <https://github.com/pypa/twine>`_ to
53 upload the archives over SSL.
54
55 .. code:: bash
56
57 twine upload dist/*
58
59 #. If all went well, change the ``jupyter_console/_version.py`` to the next
60 release.
61
62 #. Push directly on master, not forgetting to push ``--tags`` too.