Skip to content

Commit 65c00dc

Browse files
committed
Preserve pending SDK release ancestry
1 parent d980cbe commit 65c00dc

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/stlc-promote.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,21 @@ jobs:
6565
git config user.name "${APP_SLUG}[bot]"
6666
git config user.email "${bot_id}+${APP_SLUG}[bot]@users.noreply.github.com"
6767
68-
git checkout -B stlc/promote-next origin/main
68+
if [ "$HAS_NEXT" = "true" ]; then
69+
git checkout -B stlc/promote-next production/next
70+
else
71+
git checkout -B stlc/promote-next production/main
72+
fi
73+
6974
if ! git merge-base --is-ancestor production/main HEAD; then
7075
git merge --no-edit production/main
7176
fi
77+
if ! git merge-base --is-ancestor origin/main HEAD; then
78+
git merge --no-edit origin/main
79+
fi
7280
73-
if [ "$HAS_NEXT" = "true" ] && ! git merge-base --is-ancestor production/next HEAD; then
74-
echo "::error title=Promotion blocked::production next has commits that are not present in staging or production main."
75-
exit 1
81+
if [ "$HAS_NEXT" = "true" ]; then
82+
git merge-base --is-ancestor production/next HEAD
7683
fi
7784
7885
- name: Update the pending release

0 commit comments

Comments
 (0)