From 39437f0887ec982fdbfaad54c094f2c09b87b437 2016-07-22 22:19:56 From: Matthias Bussonnier Date: 2016-07-22 22:19:56 Subject: [PATCH] Update release process instruction. According to what's in #9718, that should make things a bit more organized. Closes #9718 --- diff --git a/docs/source/coredev/release_process.rst b/docs/source/coredev/release_process.rst index ee5db5d..d328749 100644 --- a/docs/source/coredev/release_process.rst +++ b/docs/source/coredev/release_process.rst @@ -8,7 +8,15 @@ This document contains the process that is used to create an IPython release. Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython`` repository automates most of the release process. This document serves as a -handy reminder and checklist for the release manager. +handy reminder and checklist for the release manager. + +During the release process, you might need the extra following dependencies: + + - ``keyring`` to access your GitHub authentication tokens + - ``testpath`` to fake some file system operations + - ``graphviz`` to generate some graphs in the documentation + + 1. Set Environment variables ---------------------------- @@ -72,6 +80,9 @@ If a major release: file you just created and remove temporarily the first entry called ``development`` (you'll need to add it back after release). + Make sure that the stats file have a header or it won't be rendered in + the final documentation. + To find duplicates and update `.mailmap`, use:: git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f @@ -174,9 +185,11 @@ Use the following to actually upload the result of the build:: It should posts them to ``archive.ipython.org``. -You will need to use `twine `_ (``twine upload -dist/*``) manually to actually upload on PyPI. Unlike setuptools, twine is able -to upload packages over SSL. +You will need to use `twine `_ ) manually to +actually upload on PyPI. Unlike setuptools, twine is able to upload packages +over SSL. + + twine upload dist/* PyPI/Warehouse will automatically hide previous releases. If you are uploading @@ -216,6 +229,13 @@ The IPython website should document the new release: - update current version and download links - update links on the documentation page (especially if a major release) +12. Update readthedocs +---------------------- + +Make sure to update readthedocs and set the latest tag as stable, as well as +checked that previous release is still building under its own tag. + + 12. Celebrate! -------------- diff --git a/tools/release b/tools/release index 69e5123..10b8595 100755 --- a/tools/release +++ b/tools/release @@ -45,44 +45,45 @@ print() # Perform local backup, go to tools dir to run it. cd(tooldir) -sh('./make_tarball.py') -sh('mv ipython-*.tgz %s' % ipbackupdir) -# Build release files -sh('./build_release %s' % ipdir) +if 'upload' in sys.argv: + cd(distdir) + print( 'Uploading distribution files to GitHub...') -# Not Registering with PyPI, registering with setup.py is insecure as communication is not encrypted -cd(ipdir) + for fname in os.listdir('.'): + # TODO: update to GitHub releases API + continue + print('uploading %s to GitHub' % fname) + desc = "IPython %s source distribution" % version + post_download("ipython/ipython", fname, description=desc) -# Upload all files -sh(sdists) + # Make target dir if it doesn't exist + print('Uploading IPython to backup site.') + sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version)) + sh('scp * %s' % release_site) -buildwheels() + print( 'Uploading backup files...') + cd(ipbackupdir) + sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site) -if 'upload' not in sys.argv: - print("`./release upload` to register and release") - sys.exit(0) + print('Done!') + print('Use `twine upload dist/*` to upload the files to PyPI') +else: + sh('./make_tarball.py') + sh('mv ipython-*.tgz %s' % ipbackupdir) + # Build release files + sh('./build_release %s' % ipdir) -print('Will not upload with setuptools as upload connection is insecure. Please use `twine upload dist/*` to upload the files to PyPI') + # Not Registering with PyPI, registering with setup.py is insecure as communication is not encrypted + cd(ipdir) -cd(distdir) -print( 'Uploading distribution files to GitHub...') + # Upload all files + sh(sdists) -for fname in os.listdir('.'): - # TODO: update to GitHub releases API - continue - print('uploading %s to GitHub' % fname) - desc = "IPython %s source distribution" % version - post_download("ipython/ipython", fname, description=desc) + buildwheels() + print("`./release upload` to upload source distribution on github and ipython archive") + sys.exit(0) -# Make target dir if it doesn't exist -print('Uploading IPython to backup site.') -sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version)) -sh('scp * %s' % release_site) -print( 'Uploading backup files...') -cd(ipbackupdir) -sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site) -print('Done!')