From 45dd7d1bc59574fda84a5092f061c1493b080665 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Sat, 16 Aug 2025 22:02:12 -0500 Subject: [PATCH] add: sync-version.sh script for easy version syncing --- sync-version.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 sync-version.sh diff --git a/sync-version.sh b/sync-version.sh new file mode 100755 index 00000000..9c34bb26 --- /dev/null +++ b/sync-version.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Sync local version with published npm version +# Run this after a release if the version bump commit didn't sync automatically + +echo "🔄 Syncing local version with npm..." + +# Get the latest published version +VERSION=$(npm view bmad-method@latest version) +echo "📦 Latest published version: $VERSION" + +# Update package.json +npm version $VERSION --no-git-tag-version + +# Update installer package.json +sed -i '' 's/"version": ".*"/"version": "'$VERSION'"/' tools/installer/package.json + +# Commit and push +git add package.json tools/installer/package.json +git commit -m "sync: update to published version $VERSION" +git push + +echo "✅ Synced to version $VERSION" \ No newline at end of file