* Release checklist

- Run twice
  $ make pre-commit
- Remove old branches
  $ git branch
  $ git branch -D [branch name]
- Check that the current virtualenv is activated and matches the current branch
- Sanitize a semantic version str
  $ python src/drain_swamp/cli_igor.py pretag "1.0.0"
- Check current version. Do not use, `python setup.py --version`
  Initial version, manually edit _version.py
  $ [means to initialize _version.py needed]
  or for pre-release or post-release development versions
  $ python src/drain_swamp/cli_igor.py current
  If not in dev mode,  in venv, update ``[prog name]._version.py`` as needed
- What would the next version be?
  Do not use if initial version like, ``v1.0.1-1-g3893340``
  $ python src/drain_swamp/cli_igor.py cheats --kind="tag"
  or
  $ python src/drain_swamp/cli_igor.py cheats --kind="current"
- start branch for release work
    $ make relbranch
- Edit supported Python version numbers. Search for "PYVERSIONS".
    - README.rst
    - docs/index.rst
- Update sphinx conf.py CHANGES.rst, and NOTICE.txt with release facts. Supply "next version":
    Seed CHANGES.rst
    $ python src/drain_swamp/cli_igor.py seed
    Edit CHANGES.rst, NOTICE.txt and docs/conf.py
    $ python src/drain_swamp/cli_igor.py edits --kind="1.0.0"
    or
    $ python src/drain_swamp/cli_igor.py edits --kind="current"
    If doc?/conf.py snippet has a snippet id
    $ python src/drain_swamp/cli_igor.py edits --kind="1.0.0" --snip="snippet_id"
- Look over CHANGES.rst
  Takes time. Rewrite commit messages to be accessible by normies. Rewrite it again.
- Update README.rst
    - "New in x.y:"
- Update docs
    - IF PRE-RELEASE:
        - Version of latest stable release in docs/index.rst
    - Make sure the docs are cogged:
        $ make prebuild
    - Don't forget the man page: docs/drain-swamp.1.txt
    - Check that the docs build correctly:
        $ tox -e docs
        or
        $ cd docs && make doctest && cd - &>/dev/null
        $ cd docs && make linkcheck && cd - &>/dev/null
        $ cd docs && make html && cd - &>/dev/null
        $ cd docs && make pdf && cd - &>/dev/null
    - tox will affect _version.py, revert version str back to tagged version
- commit the release-prep changes
    $ make relcommit1
    or
    $ git status
    $ git add [whatever]
    $ git commit -S -m ""
- Done with changes to source files
    - check them in on the release prep branch
    - wait for ci to finish
    - merge to master
      $ git branch
      $ git switch master
      $ git merge -S -m "Your merge commit message" [source_branch]
    - Check web connection then push. Don't trigger a release until a tag push
    - check build sdist **BEFORE** push. Catch issues in build backend
      $ git push
- Start the kits:
    - Build drain-swamp
      $ python -m build -C--kind="1.0.0" -C--set-lock="0"
    - Build other package
      $ export DS_CONFIG_SETTINGS=/tmp/setuptools-build.toml
      $ cat <<-EOF > "$DS_CONFIG_SETTINGS"
      [project]
      name = "whatever"
      version = "99.99.99a1.dev6"

      [tool.config-settings]
      kind="1.0.0"
      set-lock="0"
      EOF
      $ python -m build
    - Build drain-swamp as-is
      $ export DS_CONFIG_SETTINGS=/tmp/setuptools-build.toml
      $ cat <<-EOF > "$DS_CONFIG_SETTINGS"
      [project]
      name = "whatever"
      version = "99.99.99a1.dev6"

      [tool.config-settings]
      kind="tag"
      set-lock="0"
      EOF
      $ python -m build
    Trigger the kit GitHub Action (no CI integration yet)
        $ make kits_build (make debug=1 prep_kit)
- Tag the tree
    $ make tag
    or
    $ git tag -as -m "Version 1.0.0" 1.0.0
    # git push --follow-tags
