fix: fail prepare when release tag already exists
Some checks failed
Push Validation / validate (push) Has been cancelled
Some checks failed
Push Validation / validate (push) Has been cancelled
Prevent silent successful runs that skip tag creation. If the resolved release tag already exists locally or remotely, fail with guidance so users know why tag-triggered do-release will not run.
This commit is contained in:
@@ -209,8 +209,9 @@ runs:
|
|||||||
git remote set-url origin "$authed_remote"
|
git remote set-url origin "$authed_remote"
|
||||||
|
|
||||||
if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1 || git ls-remote --exit-code --tags origin "refs/tags/${RELEASE_TAG}" >/dev/null 2>&1; then
|
if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1 || git ls-remote --exit-code --tags origin "refs/tags/${RELEASE_TAG}" >/dev/null 2>&1; then
|
||||||
echo "Tag ${RELEASE_TAG} already exists; skipping commit/tag/push."
|
echo "Tag ${RELEASE_TAG} already exists; no new tag can be pushed, so tag-triggered release publication will not run." >&2
|
||||||
exit 0
|
echo "Choose a new version (or update changelog content so recommendation advances) and run Prepare Release again." >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $GIT_ADD_FILES; do
|
for f in $GIT_ADD_FILES; do
|
||||||
|
|||||||
Reference in New Issue
Block a user