Skip to content

Commit fb75b37

Browse files
committed
Fix publish script recursion issue and update publish command
1 parent 8abbe51 commit fb75b37

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"publish:patch": "npm version patch && npm publish",
2020
"publish:minor": "npm version minor && npm publish",
2121
"publish:major": "npm version major && npm publish",
22-
"publish": "./scripts/publish.sh",
22+
"publish": "echo 'Use ./scripts/publish.sh or npm run publish:patch/minor/major instead'",
2323
"prepublishOnly": "npm run clean && npm run build",
2424
"test": "echo \"No tests specified\" && exit 0",
2525
"lint": "echo \"No linter configured\" && exit 0"
@@ -71,4 +71,4 @@
7171
"url": "https://github.com/srthkdev/dbeaver-mcp-server/issues"
7272
},
7373
"homepage": "https://github.com/srthkdev/dbeaver-mcp-server#readme"
74-
}
74+
}

scripts/publish.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,19 @@ echo "🔨 Building project..."
4848
npm run build
4949

5050
echo "📤 Publishing to npm..."
51-
npm run publish:$VERSION_TYPE
51+
# Use the direct npm publish command instead of the npm run publish script to avoid recursion
52+
if [ "$VERSION_TYPE" = "major" ]; then
53+
npm version major && npm publish
54+
elif [ "$VERSION_TYPE" = "minor" ]; then
55+
npm version minor && npm publish
56+
else
57+
npm version patch && npm publish
58+
fi
5259

5360
echo ""
5461
echo "🎉 Successfully published dbeaver-mcp-server!"
5562
echo "📋 Package info:"
5663
npm info dbeaver-mcp-server version
5764
echo ""
5865
echo "🔗 Install with: npm install -g dbeaver-mcp-server@latest"
59-
echo "🌐 View on npm: https://www.npmjs.com/package/dbeaver-mcp-server"
66+
echo "🌐 View on npm: https://www.npmjs.com/package/dbeaver-mcp-server"

0 commit comments

Comments
 (0)