-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
executable file
Β·58 lines (47 loc) Β· 1.7 KB
/
publish.sh
File metadata and controls
executable file
Β·58 lines (47 loc) Β· 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Super lazy publishing script - just run ./publish.sh
set -e
echo "π Claude Parser Easy Publisher"
echo "================================"
# Check if we're on main branch
BRANCH=$(git branch --show-current)
if [ "$BRANCH" != "main" ]; then
echo "β οΈ Not on main branch (currently on $BRANCH)"
read -p "Continue anyway? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
# Get current version from pyproject.toml
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
echo "π¦ Current version: $CURRENT_VERSION"
# Ask for new version
read -p "Enter new version (or press Enter to keep $CURRENT_VERSION): " NEW_VERSION
if [ -z "$NEW_VERSION" ]; then
NEW_VERSION=$CURRENT_VERSION
fi
# Update version if changed
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
echo "π Updating version to $NEW_VERSION..."
sed -i.bak "s/^version = \".*\"/version = \"$NEW_VERSION\"/" pyproject.toml
rm pyproject.toml.bak
# Commit version bump
git add pyproject.toml
git commit -m "chore: Bump version to $NEW_VERSION"
fi
# Build
echo "π¨ Building package..."
poetry build
# Create GitHub release (this triggers the publish workflow)
echo "π·οΈ Creating GitHub release..."
git tag -a "v$NEW_VERSION" -m "Release v$NEW_VERSION"
git push origin main --tags
# Create release with GitHub CLI
gh release create "v$NEW_VERSION" \
--title "v$NEW_VERSION" \
--generate-notes \
dist/*.whl dist/*.tar.gz
echo "β
Done! The GitHub Action will now publish to PyPI automatically."
echo "π¦ Check status at: https://github.com/alicoding/claude-parser/actions"
echo "π Once published, install with: pip install claude-parser"