Skip to content

Commit f36c1c0

Browse files
chore: organize release scripts into dedicated /scripts folder
- Move all shell scripts to mcp-package/scripts/ directory - Update package.json to reference scripts in new location - Scripts remain functional via npm commands - Cleaner project structure with organized scripts 🔨 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 98a1d56 commit f36c1c0

File tree

8 files changed

+144
-5
lines changed

8 files changed

+144
-5
lines changed

mcp-package/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.0.7](https://github.com/drupaltools/drupaltools.github.io/compare/v1.0.6...v1.0.7) (2025-12-15)
6+
57
## [1.0.6](https://github.com/drupaltools/drupaltools.github.io/compare/v1.0.6...v1.0.0) (2025-12-15)

mcp-package/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@drupaltools/mcp",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Model Context Protocol (MCP) server for discovering Drupal development tools, utilities, and plugins",
55
"type": "module",
66
"main": "dist/index.js",
@@ -16,12 +16,21 @@
1616
"prepublishOnly": "npm run build && npm test",
1717
"publish": "npm run build && npm test && cd dist && npm publish",
1818
"release": "standard-version",
19+
"release:patch": "standard-version --release-as patch",
1920
"release:minor": "standard-version --release-as minor",
2021
"release:major": "standard-version --release-as major",
21-
"release:patch": "standard-version --release-as patch",
22-
"release:auto": "./release.sh",
23-
"release:auto:minor": "./release.sh minor",
24-
"release:auto:major": "./release.sh major"
22+
"release:auto": "./scripts/release.sh",
23+
"release:auto:patch": "./scripts/release-patch.sh",
24+
"release:auto:minor": "./scripts/release-minor.sh",
25+
"release:auto:major": "./scripts/release-major.sh",
26+
"release:git": "./scripts/release-git.sh",
27+
"release:git:patch": "./scripts/release-patch.sh",
28+
"release:git:minor": "./scripts/release-minor.sh",
29+
"release:git:major": "./scripts/release-major.sh",
30+
"release:full": "./scripts/release-full.sh",
31+
"release:full:patch": "./scripts/release-patch.sh publish",
32+
"release:full:minor": "./scripts/release-minor.sh publish",
33+
"release:full:major": "./scripts/release-major.sh publish"
2534
},
2635
"standard-version": {
2736
"changelogFiles": [
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# Full release script - git operations + npm publish
4+
# Usage: ./release-full.sh [patch|minor|major] (default: auto-detect)
5+
6+
set -e
7+
8+
# Get release type from argument (default: auto)
9+
RELEASE_TYPE=${1:-"auto"}
10+
11+
echo "🚀 Starting full release process..."
12+
13+
# Run git release first
14+
echo "📦 Running git release..."
15+
./release-git.sh $RELEASE_TYPE
16+
17+
# Get the version
18+
VERSION=$(node -p "require('./package.json').version")
19+
20+
# Ask about npm publish
21+
echo ""
22+
read -p "📦 Do you want to publish to npm now? (y/N): " -n 1 -r
23+
echo
24+
if [[ $REPLY =~ ^[Yy]$ ]]; then
25+
echo "📦 Publishing to npm..."
26+
npm run publish
27+
echo ""
28+
echo "🎉 Complete release finished!"
29+
echo "📋 Summary:"
30+
echo " - Version: $VERSION"
31+
echo " - GitHub: https://github.com/drupaltools/drupaltools.github.io/releases/tag/v$VERSION"
32+
echo " - npm: https://www.npmjs.com/package/@drupaltools/mcp/v/$VERSION"
33+
echo ""
34+
echo "💡 Users can now install with: npx @drupaltools/mcp@$VERSION"
35+
else
36+
echo ""
37+
echo "✅ Git release completed!"
38+
echo "📦 To publish to npm later, run: npm run publish"
39+
echo " or: cd dist && npm publish"
40+
fi

mcp-package/scripts/release-git.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# Git-only release script - updates version, builds, commits, tags, and pushes
4+
# Usage: ./release-git.sh [patch|minor|major] (default: auto-detect)
5+
6+
set -e
7+
8+
# Get release type from argument (default: auto)
9+
RELEASE_TYPE=${1:-"auto"}
10+
11+
echo "🚀 Starting git-only release process..."
12+
13+
# Check if working directory is clean
14+
if [ -n "$(git status --porcelain)" ]; then
15+
echo "❌ Working directory is not clean. Please commit or stash changes first."
16+
exit 1
17+
fi
18+
19+
# Get current version
20+
CURRENT_VERSION=$(node -p "require('./package.json').version")
21+
echo "📍 Current version: $CURRENT_VERSION"
22+
23+
# Run standard-version
24+
if [ "$RELEASE_TYPE" = "auto" ]; then
25+
echo "📝 Updating version and changelog (auto-detect)..."
26+
npm run release
27+
else
28+
echo "📝 Updating version and changelog ($RELEASE_TYPE)..."
29+
npm run release:$RELEASE_TYPE
30+
fi
31+
32+
# Get new version
33+
NEW_VERSION=$(node -p "require('./package.json').version")
34+
echo "📍 New version: $NEW_VERSION"
35+
36+
# Build the package
37+
echo "🔨 Building package..."
38+
npm run build
39+
40+
# Commit and tag
41+
echo "📤 Committing and tagging..."
42+
git add package.json RELEASES.md
43+
git commit -m "chore(release): $NEW_VERSION"
44+
git tag -a "v$NEW_VERSION" -m "Release $NEW_VERSION"
45+
46+
# Push to GitHub
47+
echo "📤 Pushing to GitHub..."
48+
git push origin master
49+
git push origin "v$NEW_VERSION"
50+
51+
echo "✅ Release $NEW_VERSION pushed to GitHub!"
52+
echo "🔗 View: https://github.com/drupaltools/drupaltools.github.io/releases/tag/v$NEW_VERSION"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Major release - convenience script for major releases
4+
# Usage: ./release-major.sh [publish]
5+
6+
echo "📦 Major release..."
7+
8+
if [ "$1" = "publish" ]; then
9+
./release-full.sh major
10+
else
11+
./release-git.sh major
12+
fi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Minor release - convenience script for minor releases
4+
# Usage: ./release-minor.sh [publish]
5+
6+
echo "📦 Minor release..."
7+
8+
if [ "$1" = "publish" ]; then
9+
./release-full.sh minor
10+
else
11+
./release-git.sh minor
12+
fi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Patch release - convenience script for patch releases
4+
# Usage: ./release-patch.sh [publish]
5+
6+
echo "📦 Patch release..."
7+
8+
if [ "$1" = "publish" ]; then
9+
./release-full.sh patch
10+
else
11+
./release-git.sh patch
12+
fi

0 commit comments

Comments
 (0)