Skip to content

Latest commit

 

History

History
144 lines (101 loc) · 2.65 KB

RELEASE.md

File metadata and controls

144 lines (101 loc) · 2.65 KB

Release instructions

Before creating a new release please do a careful consideration about the version number for the new release. We are following Semantic Versioning and PEP440.

  • Install development dependencies

    pipenv install --dev
  • Fetch upstream changes and create release branch

    git fetch upstream
    git checkout -b create-new-release upstream/master
  • Open autohooks/version.py and increment the version number.

  • Update CHANGELOG

  • Create a source distribution only. Do NOT create a wheel by running bdist_wheel.

    rm -rf dist build autohooks.egg-info
    python3 setup.py sdist
  • Create a git commit

    git add .
    git commit -m "Prepare release <version>"
  • Create a pypirc file

    vim ~/.pypirc

    with the following content (Note: <username> must be replaced)

[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username = <username>

[testpypi]
repository = https://test.pypi.org/legacy/
username = <username>
  • Create an account at Test PyPI

  • Upload the archives in dist to Test PyPI

    twine upload -r testpypi dist/*
  • Check if the package is available at https://test.pypi.org/project/autohooks

  • Create a test directory

    mkdir autohooks-install-test
    cd autohooks-install-test
    pipenv run pip install --pre -I --extra-index-url https://test.pypi.org/simple/ autohooks
  • Remove test environment

    pipenv --rm
    cd ..
    rm -rf autohooks-install-test
  • Create a release PR

    git push origin

    Open GitHub and create a PR against https://github.com/greenbone/autohooks

  • Update after PR is merged

    git fetch upstream
    git rebase upstream/master
  • Create a git tag

    git tag v<version>

    or even signed with your gpg key

    git tag -s v<version>
  • Create final source distribution

    rm -rf dist build autohooks.egg-info
    python3 setup.py sdist
  • Create an account at PyPI if not exist already

  • Upload to real PyPI

    twine upload dist/*
  • Check if new version is available at https://pypi.org/project/autohooks

  • Update version in autohooks/version.py

    Use a alpha version like (1, 1, 1, 'alpha') or (1, 1, 1, 'alpha', 0)

  • Create a commit

    git commit -m "Update version after <version> release"
  • Push changes and tag to GitHub

    git push --tags upstream master