From 0f5c36f4780ff2244c1507dd9986928f5f7da7f3 Mon Sep 17 00:00:00 2001 From: Jonathan Hartley Date: Wed, 15 Jun 2022 11:32:31 -0500 Subject: [PATCH] Further tweaks made to support the release * Add executable flag to the test-release script. * Further refinements of the release checklist * Fix makefile globbing which didn't find the sdist --- Makefile | 2 +- README-hacking.md | 24 +++++++++++------------- test-release | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index a0b8987c..924a1b60 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,6 @@ test-release: build ## Test a built release .PHONY: test-release release: ## Upload a built release - $(twine) upload dist/colorama-$(version)*{.whl,.tar.gz} + $(twine) upload dist/colorama-$(version)* .PHONY: release diff --git a/README-hacking.md b/README-hacking.md index 242f517f..a9026043 100644 --- a/README-hacking.md +++ b/README-hacking.md @@ -87,12 +87,19 @@ target. 4. Verify you're all committed, merged to master, and pushed to origin (This triggers a CI build, which we'll check later on) -5. Build the distributables (sdist and wheel), on either OS: +5. Tag the current commit with the `__version__` from `colorama/__init__.py`. + We should start using + [annotated tags for releases](https://www.tartley.com/posts/til-git-annotated-tags/), so: + + git tag -a -m "" $version + git push --follow-tags + +6. Build the distributables (sdist and wheel), on either OS: * Windows: `.\build.ps1` * Linux: `make build` -6. Test the distributables on both OS. Whichever one you do 2nd will get an +7. Test the distributables on both OS. Whichever one you do 2nd will get an HTTP 400 response on uploading to test.pypi.org, but outputs a message saying this is expected and carries on: @@ -103,23 +110,14 @@ target. (This currently only tests the wheel, but [should soon test the sdist too](https://github.com/tartley/colorama/issues/286).) -7. Check the [CI builds](https://github.com/tartley/colorama/actions/) +8. Check the [CI builds](https://github.com/tartley/colorama/actions/) are complete and all passing. -8. Upload the distributables to PyPI: +9. Upload the distributables to PyPI: * On Windows: `.\release.ps1` * On Linux: `make release` - This [should soon tag the release for you](https://github.com/tartley/colorama/issues/282). Until then: - -9. Tag the current commit with the `__version__` from `colorama/__init__.py`. - We should start using - [annotated tags for releases](https://www.tartley.com/posts/til-git-annotated-tags/), so: - - git tag -a -m "" $version - git push --follow-tags - 10. Test by installing the candidate version from PyPI, and sanity check it with 'demo.sh', making sure this is running against the PyPI installation, not local source. diff --git a/test-release b/test-release index 29653041..d22eec1a 100644 --- a/test-release +++ b/test-release @@ -19,7 +19,7 @@ version=$($bin/python setup.py --version) sandbox=test-release-playground # Upload to the test PyPI. -$bin/twine upload --repository testpypi dist/colorama-$version-* \ +$bin/twine upload --repository testpypi dist/colorama-$version* \ || echo " > Expect a 400 if package was already uploaded." # cd elsewhere so we cannot import from local source.