forked from getsentry/XcodeBuildMCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·40 lines (30 loc) · 904 Bytes
/
release.sh
File metadata and controls
executable file
·40 lines (30 loc) · 904 Bytes
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
#!/bin/bash
set -e
# Usage: ./release.sh 1.2.3
VERSION=$1
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
exit 1
fi
echo "🔧 Setting version to $VERSION..."
npm version "$VERSION" --no-git-tag-version
echo "📝 Updating version in README.md..."
sed -i '' "s/@[0-9]*\.[0-9]*\.[0-9]*/@$VERSION/g" README.md
echo ""
echo "📝 Updating version in TOOL_OPTIONS.md..."
sed -i '' "s/@[0-9]*\.[0-9]*\.[0-9]*/@$VERSION/g" TOOL_OPTIONS.md
echo "🛠 Running build..."
npm run build
echo "📦 Committing changes..."
git add .
git commit -m "Release v$VERSION"
git tag "v$VERSION"
echo "🚀 Pushing to origin..."
git push origin main --tags
echo "📦 Creating GitHub release..."
gh release create "v$VERSION" --generate-notes -t "Release v$VERSION"
echo "📤 Publishing to npm..."
npm publish
echo "✅ Release v$VERSION complete!"
echo ""
echo "📝 Don't forget to update the changelog"