Repository navigation
release: fix release.sh and the PyPI publishing - #4366
Merged
Merged
Conversation
The exit trap was armed before the sanity checks. An abort on a dirty tree ran 'git reset --hard' and dropped the uncommitted changes. Arm the trap after the checks, so it only removes what the script did. An interrupted release left the new pages from update-docs.sh as untracked files, and the next run stopped on a dirty tree. Remove them and the temporary build directory in the cleanup. Delete the tag only if this run created it, and stop if signing the tag fails instead of going on to the push prompt. The NEWS.md heading was looked up by major.minor only, so a point release such as v3.2.1 failed on the dated 3.2 heading. Use the full version. Accept only the pre-release styles of the existing tags: -rcN, -a.N and -b.N. The PyPI upload matches -rcN only, so a -rc.N tag was released but never uploaded. Add -r to select the remote to push to; not every release tree has the upstream repository as origin. Exit on an unknown option, and fix the usage text: list -f and -r, and show the version format the script accepts. Signed-off-by: Daniel Wagner <wagi@monom.org>
The release tags use the -rcN style, e.g. v3.0-rc2, but the tag check of the PyPI upload expects rcN without the dash. v3.0-rc2 and v3.0-rc3 were not uploaded, and the job did not fail. Fixes: bb54e5e ("build: update pypi upload workflow") Signed-off-by: Daniel Wagner <wagi@monom.org>
The release candidate tags are v3.0-rc1 to v3.0-rc3, and release.sh accepts only this style. Signed-off-by: Daniel Wagner <wagi@monom.org>
PyPI shows only the first name of the combined Author-email field, so the package page credits only Hannes. Without the emails, the names go to the Author field, which PyPI shows in full. Add Keith Busch. Signed-off-by: Daniel Wagner <wagi@monom.org>
Every push to master uploaded a dev release to TestPyPI, more than 650 so far. Nobody needs more than the latest one. Upload from a weekly schedule or a manual run only, and skip a version which is already there. Pushes to master still build and check the sdist. Also fix the package name in the TestPyPI install example. Signed-off-by: Daniel Wagner <wagi@monom.org>
The workflow passes options pypi-cleanup does not have, and its only run failed. It cannot work in CI: PyPI has no API to delete releases, and pypi-cleanup logs in with a password and an interactive 2FA code. Document how to remove old dev releases by hand instead. Signed-off-by: Daniel Wagner <wagi@monom.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
release.sh:
ran 'git reset --hard' and dropped uncommitted changes.
temporary build directory.
such as v3.2.1 work.
PyPI:
expects rcN without the dash, so v3.0-rc2 and v3.0-rc3 were not
uploaded.
push to master. There are more than 650 of them.
delete releases. Document the manual cleanup instead.
Busch.