Skip to content

Commit 3f770a6

Browse files
committed
Support tagging prepared releases
1 parent 79a6683 commit 3f770a6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Guidance for coding agents and contributors working in this repository.
4545
- Packaging workflow is defined under `.github/workflows/`.
4646
- The `quality.yml` workflow is the release gate; keep its WordPress/PHP matrix and immutable action pins current.
4747
- `release.sh` is the only supported tag-creation path. Do not add an automatic stable-tag workflow.
48+
- `release.sh` supports both an in-script version bump and version metadata already committed through a release pull request.
4849
- Release zip expects plugin files at repo root, including `*.php`, `readme.txt`, and `LICENSE`.
4950
- Checked-in API specs live under `docs/` and should stay aligned with the plugin routes.
5051
- GitHub Releases must publish the matching checked-in notes file from `release-notes/<version>.md`.

release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ assert_versions_match
218218

219219
stage_release_support_files
220220
git add -- "$NOTES_FILE"
221-
git commit -m "Bump version to $VERSION"
221+
if git diff --cached --quiet; then
222+
echo "Version $VERSION metadata is already committed; creating the release tag from HEAD."
223+
else
224+
git commit -m "Bump version to $VERSION"
225+
fi
222226
git tag -a "$TAG" -m "Release $VERSION"
223227
git push origin main
224228
git push origin "$TAG"

0 commit comments

Comments
 (0)