From 6cffadad6de24709c3a37d92f0d811dc71d653be Mon Sep 17 00:00:00 2001 From: mikeschulte Date: Tue, 19 May 2026 13:02:23 -0500 Subject: [PATCH] v0.4.8: video input broadening and wire safety --- CHANGELOG.md | 2 +- plexus/__init__.py | 2 +- pyproject.toml | 2 +- scripts/release.sh | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100755 scripts/release.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 862345a..360b8f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [0.4.8] - 2026-05-19 - Video input broadening and wire safety +## [0.4.9] - 2026-05-19 - Video input broadening and wire safety ### Added diff --git a/plexus/__init__.py b/plexus/__init__.py index 2adc9f9..0f4429d 100644 --- a/plexus/__init__.py +++ b/plexus/__init__.py @@ -10,5 +10,5 @@ from plexus.client import Plexus, read_mjpeg_frames from plexus.ws import WebSocketTransport -__version__ = "0.4.8" +__version__ = "0.4.9" __all__ = ["Plexus", "WebSocketTransport", "read_mjpeg_frames"] diff --git a/pyproject.toml b/pyproject.toml index a1aae9e..f4cac30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "plexus-python" -version = "0.4.8" +version = "0.4.9" description = "Thin Python SDK for Plexus — send telemetry in one line" readme = "README.md" license = "Apache-2.0" diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..2381a64 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# Usage: ./scripts/release.sh +# Example: ./scripts/release.sh 0.4.8 +# +# Extracts the matching section from CHANGELOG.md and creates a GitHub release. +# The publish workflow fires automatically and pushes to PyPI. + +set -euo pipefail + +VERSION=${1:-} +if [[ -z "$VERSION" ]]; then + echo "Usage: $0 (e.g. $0 0.4.8)" >&2 + exit 1 +fi + +# Verify the version exists in CHANGELOG.md +if ! grep -q "## \[$VERSION\]" CHANGELOG.md; then + echo "Error: no entry for [$VERSION] found in CHANGELOG.md" >&2 + exit 1 +fi + +# Verify pyproject.toml version matches +CODE_VERSION=$(python3 -c " +import re +with open('pyproject.toml') as f: + m = re.search(r'^version\s*=\s*\"(.+?)\"', f.read(), re.MULTILINE) + print(m.group(1)) +") +if [[ "$CODE_VERSION" != "$VERSION" ]]; then + echo "Error: pyproject.toml has version $CODE_VERSION, expected $VERSION" >&2 + exit 1 +fi + +# Extract release title suffix (the part after the date, e.g. "Video input broadening and wire safety") +TITLE_SUFFIX=$(grep "## \[$VERSION\]" CHANGELOG.md | sed 's/.*[0-9] - //') + +# Extract just the changelog section for this version +NOTES=$(python3 -c " +import re, sys +txt = open('CHANGELOG.md').read() +m = re.search(r'## \[$VERSION\].*?(?=\n## \[|\Z)', txt, re.DOTALL) +if not m: + sys.exit(1) +sys.stdout.write(m.group(0).strip()) +" VERSION="$VERSION") + +echo "Creating release v$VERSION — $TITLE_SUFFIX" +echo "---" +echo "$NOTES" +echo "---" +read -p "Proceed? [y/N] " confirm +if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then + echo "Aborted." >&2 + exit 1 +fi + +gh release create "v$VERSION" \ + --title "$VERSION — $TITLE_SUFFIX" \ + --notes "$NOTES" + +echo "Release v$VERSION created. PyPI publish workflow is running."