Separate release-note build from release

This commit is contained in:
Jason Carver 2019-11-25 12:22:29 -08:00 committed by Christoph Burgdorf
parent 02fe35663c
commit 07eecb5c69

View File

@ -50,18 +50,24 @@ docs: build-docs
linux-docs: build-docs linux-docs: build-docs
xdg-open docs/_build/html/index.html xdg-open docs/_build/html/index.html
release: clean notes:
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
git config commit.gpgSign true
# Let UPCOMING_VERSION be the version that is used for the current bump # Let UPCOMING_VERSION be the version that is used for the current bump
$(eval UPCOMING_VERSION=$(shell bumpversion $(bump) --dry-run --list | grep new_version= | sed 's/new_version=//g')) $(eval UPCOMING_VERSION=$(shell bumpversion $(bump) --dry-run --list | grep new_version= | sed 's/new_version=//g'))
# Now generate the release notes to have them included in the release commit # Now generate the release notes to have them included in the release commit
towncrier --yes --version $(UPCOMING_VERSION) towncrier --yes --version $(UPCOMING_VERSION)
# Before we bump the version, make sure that the towncrier-generated docs will build # Before we bump the version, make sure that the towncrier-generated docs will build
make build-docs make build-docs
# We need --allow-dirty because of the generated release_notes file that goes into the release git commit -m "Compile release notes"
# commit. No other files are added accidentially. The dry-run still runs *without* --allow-dirty
bumpversion --allow-dirty $(bump) release: clean
# require that you be on a branch that's linked to upstream/master
git status -s -b | head -1 | grep "\.\.upstream/master"
# verify that docs build correctly
./newsfragments/validate_files.py is-empty
make build-docs
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
git config commit.gpgSign true
bumpversion $(bump)
git push upstream && git push upstream --tags git push upstream && git push upstream --tags
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel
twine upload dist/* twine upload dist/*