From 652d34058c195c642d523b389baa6c9c386fddef Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sun, 28 Jul 2019 07:56:28 +0200 Subject: [PATCH] Add `pyproject.toml` file and AutoPub support Contributors will henceforth be asked to include a `RELEASE.md` file containing the release type (major, minor, patch) and a summary of the changes in the pull request. This information will be used by the continuous integration (CI) system to automatically publish a new release to PyPI when the pull request is merged. For more details, see: https://github.com/autopub/autopub --- .travis.yml | 22 ++++++++++++++++++++++ CHANGELOG.rst | 3 --- CONTRIBUTING.rst | 10 +++++++++- MANIFEST.in | 2 +- autoslug/__init__.py | 2 +- pyproject.toml | 19 +++++++++++++++++++ 6 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 pyproject.toml diff --git a/.travis.yml b/.travis.yml index 4b6835b..e300b9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,28 @@ script: coverage run --source=autoslug run_tests.py after_success: coveralls +before_deploy: + - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then travis_terminate 0; fi' + - pip install githubrelease + - pip install --pre autopub + - autopub check || travis_terminate 0 + - pip install poetry + - pip install twine + - git checkout ${TRAVIS_BRANCH} + - git remote set-url origin https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG +deploy: + provider: script + script: autopub deploy + skip_cleanup: true + on: + branch: master notifications: email: - entrop+travis@gmail.com +env: + global: + - PYPI_USERNAME=autopub + - secure: "h/uaj7XZfr9jiAqtSHNuX9Zt9YaSLD2Z0t6dxzdeKRiTe+AHdFORfO1zhqr10g8qAXhwZcD5G/tl8X2qJ+GI4eG3mLUoVL0JuNkV/EW+y5nclfDSFg9naT/soHk7AZ63EG8125B+XIQdiUT4ZY0DeMVujZjV9c/eztIwU8J/jiaLjmELcuJkV8xjcFMH5qzvX4mWeNehUuNdGj2KPCE1Pm19HeXQPavEv3oWWUk2Lx69OJJTllevhnlpg3C0kMrOCvoMNGJk/CVoumBv7HkRAegtjXg0an09B47nAnmDaoyqB5FGPSvI5b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_USERNAME + - TWINE_PASSWORD=$PYPI_PASSWORD diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eb9e57f..a6f6fb0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,9 +1,6 @@ Changelog ~~~~~~~~~ -Next release -------------- - Version 1.9.4 ------------- diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 92fd5ae..755f39b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,4 +22,12 @@ your contribution is reviewed and accepted ASAP. 4. Add documentation (comments, docstrings, hints for users). -5. Submit a pull request. Reference the original issue there. +5. Add a ``RELEASE.md`` file in the root of the project that contains the + release type (major, minor, patch) and a summary of the changes that will be + used as the release changelog entry. For example:: + + Release type: patch + + Add pyproject.toml to MANIFEST.in + +6. Submit a pull request. Reference the original issue there. diff --git a/MANIFEST.in b/MANIFEST.in index 2e1dc69..946bcba 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include *.rst -include setup.py _version_helper.py +include pyproject.toml setup.py _version_helper.py recursive-include autoslug *.py recursive-include docs * recursive-exclude docs *.pyc diff --git a/autoslug/__init__.py b/autoslug/__init__.py index 9a7ee9a..62ec96b 100644 --- a/autoslug/__init__.py +++ b/autoslug/__init__.py @@ -12,5 +12,5 @@ from autoslug.fields import AutoSlugField -__version__ = '1.9.5.dev0' +__version__ = '1.9.4' __all__ = ['AutoSlugField'] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ae67052 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "django-autoslug" +version = "1.9.4" +description = "AutoSlugField for Django" +authors = ["Justin Mayer "] +readme = "README.rst" +license = "LGPL-3.0" +keywords = ["django", "model"] + +[tool.autopub] +project-name = "django-autoslug" +git-username = "botpub" +git-email = "botpub@autopub.rocks" +changelog-file = "CHANGELOG.rst" +changelog-header = "~~~~~~~~~" +version-strings = ["autoslug/__init__.py"] + +[build-system] +requires = ["setuptools >= 40.6.0", "wheel"]