gcpipwrap
Advanced tools
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| # Release script for gcpipwrap. | ||
| # Bumps the version in pyproject.toml, commits, tags, and pushes. | ||
| # | ||
| # Usage: ./scripts/release.sh <version> | ||
| # Example: ./scripts/release.sh 0.2.0 | ||
| if [[ $# -ne 1 ]]; then | ||
| echo "Usage: $0 <version>" >&2 | ||
| echo "Example: $0 0.2.0" >&2 | ||
| exit 1 | ||
| fi | ||
| VERSION="$1" | ||
| TAG="v${VERSION}" | ||
| REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
| PYPROJECT="${REPO_ROOT}/pyproject.toml" | ||
| if [[ ! -f "$PYPROJECT" ]]; then | ||
| echo "Error: pyproject.toml not found at ${PYPROJECT}" >&2 | ||
| exit 1 | ||
| fi | ||
| if ! git diff --quiet || ! git diff --cached --quiet; then | ||
| echo "Error: working tree is dirty. Commit or stash changes first." >&2 | ||
| exit 1 | ||
| fi | ||
| if git rev-parse "$TAG" >/dev/null 2>&1; then | ||
| echo "Error: tag ${TAG} already exists" >&2 | ||
| exit 1 | ||
| fi | ||
| CURRENT=$(grep -oP '^version = "\K[^"]+' "$PYPROJECT") | ||
| echo "Bumping version: ${CURRENT} -> ${VERSION}" | ||
| sed -i "s/^version = \"${CURRENT}\"/version = \"${VERSION}\"/" "$PYPROJECT" | ||
| git add "$PYPROJECT" | ||
| git commit -m "Bump version to ${VERSION}" | ||
| git tag "$TAG" | ||
| echo "" | ||
| echo "Version ${VERSION} committed and tagged as ${TAG}." | ||
| echo "Run the following to push:" | ||
| echo " git push origin main ${TAG}" |
@@ -21,2 +21,3 @@ name: Publish to PyPI | ||
| persist-credentials: false | ||
| ref: ${{ github.event.release.tag_name }} | ||
@@ -23,0 +24,0 @@ - name: Install uv |
@@ -8,2 +8,3 @@ """Wrapper around pip install with multi-index and URL support.""" | ||
| from pipwrap.logger import setup_logger | ||
| from urllib.parse import urlparse | ||
@@ -15,2 +16,6 @@ logger = setup_logger() | ||
| """Wraps pip install with support for multiple indexes and URL installs.""" | ||
| def __init__(self, trust_all_hosts: bool = False) -> None: | ||
| """Initialize the installer.""" | ||
| self.trust_all_hosts = trust_all_hosts | ||
@@ -37,2 +42,4 @@ def build_install_command( | ||
| cmd.extend([flag, url]) | ||
| if (self.trust_all_hosts): | ||
| cmd.extend(["--trusted-host", f"{urlparse(url).netloc}"]) | ||
@@ -39,0 +46,0 @@ cmd.extend(packages) |
+1
-1
| Metadata-Version: 2.4 | ||
| Name: gcpipwrap | ||
| Version: 0.1.3 | ||
| Version: 0.1.5 | ||
| Summary: Wrapper around pip with multi-index and URL install support | ||
@@ -5,0 +5,0 @@ Requires-Python: >=3.13 |
+1
-1
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "gcpipwrap" | ||
| version = "0.1.3" | ||
| version = "0.1.5" | ||
| description = "Wrapper around pip with multi-index and URL install support" | ||
@@ -10,0 +10,0 @@ readme = "README.md" |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
24170
6.92%15
7.14%430
1.42%