fix: harden manual release path

This commit is contained in:
Affaan Mustafa
2026-04-12 02:53:19 -07:00
parent 9d849711f1
commit d2deb04489
2 changed files with 59 additions and 2 deletions

View File

@@ -44,8 +44,8 @@ if [[ "$CURRENT_BRANCH" != "main" ]]; then
exit 1
fi
# Check working tree is clean
if ! git diff --quiet || ! git diff --cached --quiet; then
# Check working tree is clean, including untracked files
if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then
echo "Error: Working tree is not clean. Commit or stash changes first."
exit 1
fi
@@ -193,6 +193,10 @@ update_version "$OPENCODE_PACKAGE_JSON" "s|\"version\": *\"[^\"]*\"|\"version\":
update_package_lock_version "$OPENCODE_PACKAGE_LOCK_JSON"
update_readme_version_row
# Verify the bumped release surface is still internally consistent before
# writing a release commit, tag, or push.
node tests/plugin-manifest.test.js
# Stage, commit, tag, and push
git add "$ROOT_PACKAGE_JSON" "$PACKAGE_LOCK_JSON" "$ROOT_AGENTS_MD" "$AGENT_YAML" "$VERSION_FILE" "$PLUGIN_JSON" "$MARKETPLACE_JSON" "$CODEX_MARKETPLACE_JSON" "$CODEX_PLUGIN_JSON" "$OPENCODE_PACKAGE_JSON" "$OPENCODE_PACKAGE_LOCK_JSON" "$README_FILE"
git commit -m "chore: bump plugin version to $VERSION"