Skip to content

Fix release script - #95

Open
marco-c wants to merge 6 commits into
web-push-libs:mainfrom
marco-c:fix-release-script
Open

marco-c wants to merge 6 commits into
web-push-libs:mainfrom
marco-c:fix-release-script

Conversation

@marco-c

@marco-c marco-c commented Nov 11, 2026

Copy link
Copy Markdown
Member

No description provided.

package.json points "types" to types/ece.d.ts, which is generated by tsc
and gitignored, so nothing guaranteed it existed when publishing.
The script required the build and twine packages to be installed in the
system Python, and failed with "No module named build" otherwise.
The tag was always pushed to "origin", which may be a personal fork, and
the version bump commit was never pushed at all. Push both to the remote
pointing at web-push-libs (overridable with RELEASE_REMOTE).
Previously a failure (e.g. not being logged in to npm) could happen after
the PyPI upload, leaving a half-done release. Now the script verifies up
front that the working tree is clean, the tag doesn't exist yet and npm
is logged in, and only then bumps the version.

Also enable strict mode (set -euo pipefail), quote paths, split the
version with read instead of a global IFS change, anchor the pyproject
version match and stop leaving "~" backup files behind.
Remove stale dist/ and build/ output, run npm ci, the test suite and
npm pack (which builds the TypeScript declarations), and validate the
Python distributions with twine check. All of this happens before the
first upload, so a local failure can't leave a partially published
release. If a check fails after the version bump, the bump is reverted
so the release can be retried from a clean tree.
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