From 7dce67c298425b8b3f3d64aeaf182f4d836f00d3 Mon Sep 17 00:00:00 2001 From: test-user Date: Wed, 1 Apr 2026 12:06:55 -0700 Subject: [PATCH] chore: remove release.sh, update CLAUDE.md with manual release steps Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 17 +++++++------- release.sh | 66 ------------------------------------------------------ 2 files changed, 8 insertions(+), 75 deletions(-) delete mode 100755 release.sh diff --git a/CLAUDE.md b/CLAUDE.md index 736b130..50d0c28 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Remove-AI-Watermarks -CLI tool and Python library for removing visible and invisible AI watermarks from images. +You are a **principal Python engineer** maintaining a CLI tool and library for removing visible and invisible AI watermarks from images. ## Build & Run @@ -43,15 +43,14 @@ uv run pyright # type check ## Release Process -To create a new release, run: +To release a new version (X.Y.Z): +1. Run all checks (`./maintain.sh`) +2. Update version in `pyproject.toml` and `src/remove_ai_watermarks/__init__.py` +3. Commit: `chore: bump version to X.Y.Z` +4. Tag: `git tag vX.Y.Z` +5. Push: `git push origin main && git push origin vX.Y.Z` -```bash -./release.sh # e.g. ./release.sh 0.4.0 -``` - -The script will: validate version format (X.Y.Z) → run all checks (ruff, pytest, pyright) → update version in `pyproject.toml` and `src/remove_ai_watermarks/__init__.py` → commit → create git tag `vX.Y.Z` → push. GitHub Actions will then automatically create a GitHub Release with build artifacts. - -When asked to make a release, always use `./release.sh`. +GitHub Actions will automatically create a GitHub Release with build artifacts. ## Pre-commit Hook diff --git a/release.sh b/release.sh deleted file mode 100755 index 4b43595..0000000 --- a/release.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -VERSION="${1:-}" - -if [[ -z "$VERSION" ]]; then - echo "Usage: ./release.sh " - echo "Example: ./release.sh 0.4.0" - exit 1 -fi - -if ! [[ "$VERSION" =~ ^[1-9][0-9]*\.[0-9]+\.[0-9]+$|^0\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: version must be in X.Y.Z format (e.g. 0.4.0)" - exit 1 -fi - -TAG="v$VERSION" - -BRANCH="$(git rev-parse --abbrev-ref HEAD)" -if [[ "$BRANCH" != "main" ]]; then - echo "Error: releases must be made from the main branch (currently on $BRANCH)" - exit 1 -fi - -if git rev-parse "$TAG" >/dev/null 2>&1; then - echo "Error: tag $TAG already exists" - exit 1 -fi - -if [[ -n "$(git status --porcelain)" ]]; then - echo "Error: working tree is not clean. Commit or stash changes first." - exit 1 -fi - -echo "=== Releasing $TAG ===" - -echo "→ Running checks..." -uv run ruff check -uv run ruff format --check -uv run pytest -uv run pyright - -echo "→ Updating version to $VERSION..." -# Portable sed -i: works on both macOS (BSD) and Linux (GNU) -if sed --version >/dev/null 2>&1; then - # GNU sed - sed -i "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml - sed -i "s/^__version__ = \".*\"/__version__ = \"$VERSION\"/" src/remove_ai_watermarks/__init__.py -else - # BSD sed (macOS) - sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml - sed -i '' "s/^__version__ = \".*\"/__version__ = \"$VERSION\"/" src/remove_ai_watermarks/__init__.py -fi - -echo "→ Committing..." -git add pyproject.toml src/remove_ai_watermarks/__init__.py -git commit -m "chore: bump version to $VERSION" - -echo "→ Tagging $TAG..." -git tag "$TAG" - -echo "→ Pushing..." -git push origin main -git push origin "$TAG" - -echo "=== Released $TAG ==="