File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121* .zip
2222sandbox. *
23- release.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Usage: ./release.sh 1.2.3
4+ # Assumes version is set in pyproject.toml or setup.cfg
5+
6+ set -e
7+
8+ VERSION=$1
9+
10+ if [[ -z " $VERSION " ]]; then
11+ echo " ❌ Error: No version number supplied."
12+ echo " 👉 Usage: ./release.sh 1.2.3"
13+ exit 1
14+ fi
15+
16+ TAG=" v$VERSION "
17+
18+ # Confirm version bump is in code
19+ echo " 📦 Preparing release: $TAG "
20+ grep " $VERSION " pyproject.toml || {
21+ echo " ❌ Version $VERSION not found in pyproject.toml. Did you forget to bump it?"
22+ exit 1
23+ }
24+
25+ # Commit the version bump
26+ git add -A
27+ git commit -m " Release $TAG "
28+
29+ # Create tag
30+ git tag " $TAG "
31+
32+ # Push commit and tag
33+ git push origin main
34+ git push origin " $TAG "
35+
36+ echo " ✅ Release $TAG pushed! GitHub Actions will handle the rest."
You can’t perform that action at this time.
0 commit comments