mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-27 17:37:39 +08:00
Fix SIGPIPE false negative in backport release validation (#14041)
This commit is contained in:
parent
32e58393b8
commit
5d681a5420
16
.github/workflows/backport_release.yaml
vendored
16
.github/workflows/backport_release.yaml
vendored
@ -110,15 +110,13 @@ jobs:
|
|||||||
|
|
||||||
source_sha="$(git rev-parse "refs/remotes/origin/${SOURCE_BRANCH}")"
|
source_sha="$(git rev-parse "refs/remotes/origin/${SOURCE_BRANCH}")"
|
||||||
|
|
||||||
# The source branch must be cut directly off the latest stable tag.
|
# Walking first-parent from the source tip must reach LATEST_TAG_SHA.
|
||||||
# "Cut directly off" means: walking first-parent from the source tip
|
# We capture rev-list into a variable and grep against a here-string
|
||||||
# eventually reaches LATEST_TAG_SHA. This rejects branches that were
|
# rather than piping `rev-list | grep -q`: under `set -o pipefail`,
|
||||||
# cut from master after the tag (which would carry unrelated commits),
|
# `grep -q` would exit on first match and SIGPIPE the still-streaming
|
||||||
# while accepting a branch rooted at the tag with N backport commits
|
# `rev-list`, propagating exit 141 as a spurious "not found".
|
||||||
# on top (each of which may itself be a merge — first-parent walks
|
first_parent_chain="$(git rev-list --first-parent "${source_sha}")"
|
||||||
# through the mainline of the branch).
|
if ! grep -Fxq "${LATEST_TAG_SHA}" <<< "${first_parent_chain}"; then
|
||||||
if ! git rev-list --first-parent "${source_sha}" \
|
|
||||||
| grep -qx "${LATEST_TAG_SHA}"; then
|
|
||||||
echo "::error::Source branch '${SOURCE_BRANCH}' is not cut from '${LATEST_TAG}'."
|
echo "::error::Source branch '${SOURCE_BRANCH}' is not cut from '${LATEST_TAG}'."
|
||||||
echo "::error::Its first-parent history does not include ${LATEST_TAG_SHA}."
|
echo "::error::Its first-parent history does not include ${LATEST_TAG_SHA}."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user