Skip to content

Releasing

rocky edited this page Oct 10, 2024 · 4 revisions

Table of Contents

Change version in spark_parser/version.py. Then:

$ emacs spark_parser/version.py
$ source spark_parser/version.py
$ echo $__version__
$ git commit -m"Get ready for release $__version__".
$ export PYMODULE_NAME=spark_parser

Look over how the last release displays and change README.rst

Update ChangeLog:

$ make ChangeLog
$ patch < ChangeLog-spell-corrected.diff
$ codespell ChangeLog

Update NEWS.md from ChangeLog. Then:

$ emacs NEWS.md
$ make check
$ git commit --amend .
$ git push   # get CI testing going early

Make sure pyenv is running and check newer versions

$ ./admin-tools/check-newest-versions.sh

Python 3.6 to 3.10

$ ./admin-tools/merge-for-3.6.sh
$ git commit && git commit .
$ make check
$ ./admin-tools/check-3.6-3.10-versions.sh
$ git push origin HEAD

Python 3.3 to 3.5

$ ./admin-tools/merge-for-3.3.sh
$ make check
$ ./admin-tools/check-3.3-3.5-versions.sh
$ git push origin HEAD

Python 3.0 to 3.2

$ ./admin-tools/merge-for-3.0.sh
$ make check-full
$ admin-tools/check-3.0-3.2-versions.sh
$ git push origin HEAD

Python 2.4 to 2.7

$ ./admin-tools/merge-for-2.4.sh
$ make check-full
$ . ./admin-tools/check-2.4-2.7-versions.sh
$ git push origin HEAD

Make packages and tag

$ admin-tools/make-dist-2.4-2.7.sh
$ git tag release-python-2.4-$__version__
$ twine check dist/spark_parser-$__version__*
$ . ./admin-tools/make-dist-3.0-3.2.sh
$ git tag release-python-3.0-$__version__s
$ . ./admin-tools/make-dist-3.3-3.5.sh
$ git tag release-python-3.3-$__version__
$ . ./admin-tools/make-dist-3.6-3.10.sh
$ git tag release-python-3.6-$__version__
$ . ./admin-tools/make-dist-newest.sh
$ twine check dist/spark_parser*.{whl,egg}

Check package on github

$ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
$ pyenv local 3.11.7 # not the latest 3.11
$ pip install -e git+https://github.com/rocky/python-spark#egg=${PYMODULE_NAME}
$ spark-parser-coverage --help
$ spark-parser-coverage
$ pip uninstall ${PYMODULE_NAME}
$ popd

Go to https://github.com/rocky/python-spark/releases and copy from NEWS.md

Upload the rest of the wheels or eggs for other Python versions

Note: we need to make sure we upload the master source last so that the front page displays properly.

$ twine upload dist/${PYMODULE_NAME}-${__version__}*

Push tags:

$ git push --tags

Move dist files to uploaded

$ mv -v dist/spark_parser-${__version__}* dist/uploaded

Bump version to dev

In spark_parser/version.py, bump number and add .dev0.