forked from vespo92/SolidworksMCP-TS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
executable file
Β·51 lines (42 loc) Β· 1.18 KB
/
publish.sh
File metadata and controls
executable file
Β·51 lines (42 loc) Β· 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# SolidWorks MCP Server - NPM Publish Script
echo "π¦ Preparing to publish SolidWorks MCP Server v2.0..."
# Ensure we're on the latest code
echo "β Building project..."
npm run build
# Run tests
echo "β Running tests..."
npm test
# Check if logged into npm
echo "β Checking npm login..."
npm whoami &> /dev/null
if [ $? -ne 0 ]; then
echo "β Not logged into npm. Please run: npm login"
exit 1
fi
# Dry run to check what will be published
echo "β Running npm publish dry-run..."
npm publish --dry-run
echo ""
echo "π Review the files above that will be published."
echo ""
read -p "Do you want to publish to npm? (y/n) " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "β Publishing to npm..."
npm publish --access public
if [ $? -eq 0 ]; then
echo "β
Successfully published to npm!"
echo ""
echo "Package available at: https://www.npmjs.com/package/solidworks-mcp-server"
echo ""
echo "Users can now install with:"
echo " npm install -g solidworks-mcp-server"
else
echo "β Failed to publish to npm"
exit 1
fi
else
echo "β Publishing cancelled"
exit 0
fi