From 208733130eafb38bd1f570eb7172267a3e64843d Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 16 Jan 2026 17:19:36 +0900 Subject: [PATCH] add script to create pull-request --- upgrade/upgrade.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 upgrade/upgrade.sh diff --git a/upgrade/upgrade.sh b/upgrade/upgrade.sh new file mode 100755 index 0000000..9dbd03b --- /dev/null +++ b/upgrade/upgrade.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +cd "$(dirname "$0")/.." + +go run upgrade/upgrade.go +VERSION=$(grep '#define SQLITE_VERSION_NUMBER' sqlite3-binding.c | grep -o '[0-9]\{7\}') + +if [ -z "$VERSION" ]; then + echo "Error: Could not extract SQLite version" + exit 1 +fi + +git branch -d "sqlite-amalgamation-$VERSION" 2>/dev/null || true +git checkout -b "sqlite-amalgamation-$VERSION" +git commit -m "Upgrade SQLite to version $VERSION" sqlite3-binding.c sqlite3-binding.h sqlite3ext.h +git push origin HEAD + +gh pr create --title "Upgrade SQLite to version $VERSION" --body "Automated SQLite upgrade to version $VERSION" --web