mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-05-21 04:06:48 +02:00
chore: remove release.sh, update CLAUDE.md with manual release steps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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 <version> # 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
|
||||
|
||||
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="${1:-}"
|
||||
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
echo "Usage: ./release.sh <version>"
|
||||
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 ==="
|
||||
Reference in New Issue
Block a user