Skip to content

Commit 628f620

Browse files
committed
Show tag ancestor info
1 parent 760d75b commit 628f620

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/release-proposal-dispatch.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,20 @@ jobs:
236236
RANGE="$TAG..$ORIGINAL_HEAD"
237237
echo "Using $RANGE as range"
238238
239+
echo "Tag $TAG hash:"
240+
git rev-parse "$TAG"
241+
242+
if git merge-base --is-ancestor "$TAG" "$ORIGINAL_HEAD" 2>/dev/null; then
243+
echo " Tag is ancestor of HEAD, using $RANGE"
244+
else
245+
MERGE_BASE=$(git merge-base "$TAG" "$ORIGINAL_HEAD" 2>/dev/null || echo "")
246+
if [ -n "$MERGE_BASE" ]; then
247+
echo " Tag is NOT ancestor of HEAD, using merge-base: $MERGE_BASE"
248+
else
249+
echo " WARNING: Could not find merge-base, using $RANGE"
250+
fi
251+
fi
252+
239253
echo "Is the tag $TAG in the branch:"
240254
git branch --contains "$TAG" || {
241255
echo "Error: Tag $TAG is not in the branch" >&2

0 commit comments

Comments
 (0)