Skip to content

Commit bb6ad1f

Browse files
committed
release script
1 parent e7a3d7a commit bb6ad1f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/publish-release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail xtrace
4+
5+
if [[ -n $(git status --porcelain | grep -v VERSION | grep -v sqlite-dist.toml) ]]; then
6+
echo "❌ There are other un-staged changes to the repository besides VERSION and sqlite-dist.toml"
7+
exit 1
8+
fi
9+
10+
VERSION="$(cat VERSION)"
11+
12+
echo "Publishing version v$VERSION..."
13+
14+
make version
15+
git add --all
16+
git commit -m "v$VERSION"
17+
git tag v$VERSION
18+
git push origin main v$VERSION
19+
20+
if grep -qE "alpha|beta" VERSION; then
21+
gh release create v$VERSION --title=v$VERSION --prerelease --notes=""
22+
else
23+
gh release create v$VERSION --title=v$VERSION
24+
fi
25+
26+
27+
echo "✅ Published! version v$VERSION"

0 commit comments

Comments
 (0)