From a6b352e0623724b002b6ad07fcb9c11759ccdebe Mon Sep 17 00:00:00 2001 From: "balazs.benyo" Date: Tue, 9 Jun 2026 14:02:09 +0200 Subject: [PATCH] Patch upstream tags oldest-first so deployment default lands on newest When a backlog accumulates between scheduled runs, the previous newest-first order caused each subsequent run to patch an older tag, which the deployment repo would then adopt as default via Bitrise CI. Iterating ascending ensures the last patched branch is the newest tag. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/auto-patch-upstream.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-patch-upstream.yml b/.github/workflows/auto-patch-upstream.yml index bae821c4616..70f2b8fd9ea 100644 --- a/.github/workflows/auto-patch-upstream.yml +++ b/.github/workflows/auto-patch-upstream.yml @@ -39,12 +39,14 @@ jobs: # Minimum upstream version to process — older tags are ignored MIN_TAG="v2.328.0" - # Collect upstream v* tags >= MIN_TAG, newest first + # Collect upstream v* tags >= MIN_TAG, oldest first so a backlog is drained + # in ascending order — the last patched branch (which the deployment repo + # picks up as default via Bitrise CI) is always the newest tag. UPSTREAM_TAGS=$(git tag -l 'upstream/v*' | sed 's|^upstream/||' | while read -r TAG; do if [ "$(printf '%s\n%s\n' "$MIN_TAG" "$TAG" | sort -V | head -n1)" = "$MIN_TAG" ]; then echo "$TAG" fi - done | sort -rV) + done | sort -V) MAX_PATCHES=1 PATCHED=0