Update release notes script after CHANGELOG changed location

This commit is contained in:
Bruno Oliveira 2019-12-20 08:54:44 -03:00
parent e1df9dbf0d
commit 994909270f
3 changed files with 12 additions and 6 deletions

View File

@ -80,9 +80,9 @@ jobs:
addons:
apt:
packages:
# required by publish_gh_release_notes
# required by publish-gh-release-notes
- pandoc
after_deploy: tox -e publish_gh_release_notes
after_deploy: tox -e publish-gh-release-notes
deploy:
provider: pypi
user: nicoddemus

View File

@ -6,7 +6,13 @@ This script is meant to be executed after a successful deployment in Travis.
Uses the following environment variables:
* GIT_TAG: the name of the tag of the current commit.
* GH_RELEASE_NOTES_TOKEN: a personal access token with 'repo' permissions. It should be encrypted using:
* GH_RELEASE_NOTES_TOKEN: a personal access token with 'repo' permissions.
Create one at:
https://github.com/settings/tokens
It should be encrypted using:
$travis encrypt GH_RELEASE_NOTES_TOKEN=<token> -r pytest-dev/pytest
@ -33,7 +39,7 @@ def publish_github_release(slug, token, tag_name, body):
def parse_changelog(tag_name):
p = Path(__file__).parent.parent / "CHANGELOG.rst"
p = Path(__file__).parent.parent / "doc/en/changelog.rst"
changelog_lines = p.read_text(encoding="UTF-8").splitlines()
title_regex = re.compile(r"pytest (\d\.\d+\.\d+) \(\d{4}-\d{2}-\d{2}\)")

View File

@ -127,7 +127,7 @@ deps =
towncrier
commands = python scripts/release.py {posargs}
[testenv:publish_gh_release_notes]
[testenv:publish-gh-release-notes]
description = create GitHub release after deployment
basepython = python3
usedevelop = True
@ -135,7 +135,7 @@ passenv = GH_RELEASE_NOTES_TOKEN TRAVIS_TAG TRAVIS_REPO_SLUG
deps =
github3.py
pypandoc
commands = python scripts/publish_gh_release_notes.py
commands = python scripts/publish-gh-release-notes.py {posargs}
[pytest]