2024-04-27 12:46:53 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
set -euo pipefail xtrace
|
|
|
|
|
|
2024-04-27 12:54:26 -07:00
|
|
|
if [[ -n $(git status --porcelain | grep -v VERSION | grep -v sqlite-dist.toml) ]]; then
|
|
|
|
|
echo "❌ There are other un-staged changes to the repository besides VERSION and sqlite-dist.toml"
|
2024-04-27 12:46:53 -07:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
VERSION="$(cat VERSION)"
|
|
|
|
|
|
|
|
|
|
echo "Publishing version v$VERSION..."
|
|
|
|
|
|
|
|
|
|
make version
|
|
|
|
|
git add --all
|
|
|
|
|
git commit -m "v$VERSION"
|
|
|
|
|
git tag v$VERSION
|
|
|
|
|
git push origin main v$VERSION
|
|
|
|
|
|
|
|
|
|
if grep -qE "alpha|beta" VERSION; then
|
2024-08-05 16:04:08 -07:00
|
|
|
gh release create v$VERSION --title=v$VERSION --prerelease
|
2024-04-27 12:46:53 -07:00
|
|
|
else
|
|
|
|
|
gh release create v$VERSION --title=v$VERSION
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "✅ Published! version v$VERSION"
|