Skip to content

fix: bump plugin manifests to 5.7.0 and enforce version consistency in CI#28

Merged
intel352 merged 3 commits into
mainfrom
copilot/update-version-references-to-5-7-0
May 8, 2026
Merged

fix: bump plugin manifests to 5.7.0 and enforce version consistency in CI#28
intel352 merged 3 commits into
mainfrom
copilot/update-version-references-to-5-7-0

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

  • scripts/bump-version.sh — add || true to grep|head|sed pipeline so the [[ -z "$OLD_VERSION" ]] guard is reachable under set -euo pipefail
  • scripts/bump-version.sh — pre-check that the old version string exists in each file before running sed; accumulate errors and exit non-zero if any file was skipped, preventing silent "Updated" without actual change; clarify error message to say "cannot update" instead of "skipping" since the script will ultimately fail
  • tests/version-check.sh — add || true to the grep|head|sed pipeline inside extract_version() so the [[ -z "$ver" ]] guard is reachable
  • tests/version-check.sh — replace git tag --sort=... | grep | head (latest tag) with git describe --tags --exact-match HEAD so --check-tag compares against the tag at HEAD, not the globally newest tag

Copilot AI self-assigned this May 8, 2026
Copilot AI review requested due to automatic review settings May 8, 2026 13:51
Copilot AI review requested due to automatic review settings May 8, 2026 13:51
@intel352 intel352 marked this pull request as ready for review May 8, 2026 13:52
Copilot AI review requested due to automatic review settings May 8, 2026 13:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bumps the declared plugin version to 5.7.0 across the repository’s plugin manifests and adds automation (script + test + CI workflow) to prevent future version drift.

Changes:

  • Updated plugin manifest "version" fields to 5.7.0 in three JSON manifests.
  • Added scripts/bump-version.sh to update versions across the allowlisted manifests.
  • Added tests/version-check.sh plus a GitHub Actions workflow to enforce consistency (and tag alignment on tag pushes).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/version-check.sh New consistency check script with optional git-tag verification mode.
scripts/bump-version.sh New helper script to bump version across the three manifest files.
.github/workflows/version-check.yml CI workflow to run the version check on PRs/pushes and on tag pushes.
.cursor-plugin/plugin.json Manifest version bump to 5.7.0.
.claude-plugin/plugin.json Manifest version bump to 5.7.0.
.claude-plugin/marketplace.json Manifest version bump to 5.7.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/version-check.sh Outdated
)

extract_version() {
grep '"version"' "$1" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/'
Comment thread tests/version-check.sh
Comment on lines +67 to +76
if [[ "$CHECK_TAG" == true ]]; then
# Get the latest semver tag (strip the leading 'v')
LATEST_TAG=$(git -C "$REPO_ROOT" tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || true)
if [[ -z "$LATEST_TAG" ]]; then
echo "WARNING: No semver git tags found; skipping tag check." >&2
else
TAG_VERSION="${LATEST_TAG#v}"
if [[ "$FIRST_VERSION" != "$TAG_VERSION" ]]; then
echo "ERROR: Plugin version '$FIRST_VERSION' does not match latest git tag '$LATEST_TAG'." >&2
echo " Run: scripts/bump-version.sh ${TAG_VERSION}" >&2
Comment thread scripts/bump-version.sh Outdated
Comment on lines +38 to +42
OLD_VERSION=$(grep '"version"' "$PRIMARY" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/')
if [[ -z "$OLD_VERSION" ]]; then
echo "ERROR: Could not detect current version from $PRIMARY" >&2
exit 1
fi
Comment thread scripts/bump-version.sh
echo "WARNING: $rel_path not found, skipping" >&2
continue
fi
sed -i.bak "s/\"version\": \"${OLD_VERSION}\"/\"version\": \"${NEW_VERSION}\"/" "$abs_path" && rm -f "${abs_path}.bak"
@intel352
Copy link
Copy Markdown
Contributor

intel352 commented May 8, 2026

@copilot apply changes based on the comments in this thread

Copilot AI requested review from Copilot and removed request for Copilot May 8, 2026 14:02
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 8, 2026

@copilot apply changes based on the comments in this thread

Applied all 4 review comments in cb562b8:

  1. bump-version.sh:38 — added || true to the grep|head|sed pipeline so the [[ -z "$OLD_VERSION" ]] error guard is reachable under set -euo pipefail.
  2. bump-version.sh:64 — pre-checks each file for the old version string with grep -qF before calling sed; errors are accumulated and the script exits non-zero at the end, preventing a silent "Updated" when no replacement occurred. Error message says "cannot update" (not "skipping") to reflect that the run will fail.
  3. version-check.sh:30 — added || true inside extract_version() so the [[ -z "$ver" ]] guard is reachable.
  4. version-check.sh:67-76 — replaced git tag --sort | grep | head (globally latest tag) with git describe --tags --exact-match HEAD 2>/dev/null || true, so --check-tag compares against the tag that points at HEAD rather than any newer unrelated tag. Non-semver or absent HEAD tags emit a warning and skip the check.

Copilot AI requested a review from intel352 May 8, 2026 14:03
@intel352 intel352 merged commit 8ad25c7 into main May 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants