Skip to content

Commit

Permalink
Further tweaks made to support the release
Browse files Browse the repository at this point in the history
* Add executable flag to the test-release script.
* Further refinements of the release checklist
* Fix makefile globbing which didn't find the sdist
  • Loading branch information
tartley committed Jun 15, 2022
1 parent c29f133 commit 0f5c36f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -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

24 changes: 11 additions & 13 deletions README-hacking.md
Expand Up @@ -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:

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test-release
Expand Up @@ -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.
Expand Down

0 comments on commit 0f5c36f

Please sign in to comment.