Skip to content

release: fix release.sh and the PyPI publishing - #4366

Merged
igaw merged 6 commits into
linux-nvme:masterfrom
igaw:fix-release-script
Nov 2, 2026
Merged

igaw merged 6 commits into
linux-nvme:masterfrom
igaw:fix-release-script

Conversation

@igaw

@igaw igaw commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

release.sh:

  • Arm the cleanup after the sanity checks. An abort on a dirty tree
    ran 'git reset --hard' and dropped uncommitted changes.
  • On Ctrl-C, also remove the new pages from update-docs.sh and the
    temporary build directory.
  • Delete the tag only if this run created it. Stop if signing fails.
  • Look up the NEWS.md heading by the full version, so point releases
    such as v3.2.1 work.
  • Accept only the existing tag styles: -rcN, -a.N and -b.N.
  • Add -r to select the remote.

PyPI:

  • Upload release candidates again. Since bb54e5e the tag check
    expects rcN without the dash, so v3.0-rc2 and v3.0-rc3 were not
    uploaded.
  • Upload dev releases to TestPyPI once a week instead of on every
    push to master. There are more than 650 of them.
  • Drop the cleanup workflow. It cannot work in CI: PyPI has no API to
    delete releases. Document the manual cleanup instead.
  • List the authors by name, so PyPI shows all of them. Add Keith
    Busch.
  • Document the -rcN style in meson.build.

igaw added 6 commits November 2, 2026 18:14
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>
@igaw
igaw merged commit 22f427a into linux-nvme:master Nov 2, 2026
36 checks passed
@igaw
igaw deleted the fix-release-script branch November 2, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant