From e93f7547c2e215de8fd766407b8618f334c89214 Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Sun, 11 Oct 2026 17:47:52 +0900 Subject: [PATCH] ci: the version bump reminder watches every path publish-mcp.yml does, and compares the version field The reminder step left out the root lockfile and scripts/, which change what is bundled into the shell and trigger the publish workflow; and it took any change of packages/mcp-server/package.json (a dependency bump) for a version bump. It now compares the version field between the two commits. --- .github/workflows/test.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a8f1e35..0645bff7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,15 +104,18 @@ jobs: env: CI: true - # The shell bundles the web app's canvas, so a change under these paths + # The shell bundles the web app's canvas and the root's dependencies, + # so a change under these paths (the ones publish-mcp.yml triggers on) # reaches users with the next MCP release, and publish-mcp.yml only # publishes a new version number - name: Remind to bump the MCP version when bundled code changed if: github.event_name == 'pull_request' run: | - changed=$(git diff --name-only HEAD^1 HEAD -- components contexts hooks lib stores app/globals.css packages/mcp-server/src packages/mcp-server/shell) - if [ -n "$changed" ] && git diff --quiet HEAD^1 HEAD -- packages/mcp-server/package.json; then - echo "::warning::Code bundled into the MCP server changed without a version bump in packages/mcp-server/package.json. Bump it if the change should be published." + changed=$(git diff --name-only HEAD^1 HEAD -- components contexts hooks lib stores app/globals.css package-lock.json scripts packages/mcp-server) + base_version=$(git show HEAD^1:packages/mcp-server/package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).version") + head_version=$(node -p "require('./packages/mcp-server/package.json').version") + if [ -n "$changed" ] && [ "$base_version" = "$head_version" ]; then + echo "::warning::Code bundled into the MCP server changed without a version bump in packages/mcp-server/package.json (still ${head_version}). Bump it if the change should be published." fi - name: Upload test results