@@ -48,28 +48,40 @@ jobs:
4848 fi
4949
5050 patch="${SEMVER##*.}"
51- normalized_patch=$((10#$patch))
52- normalized_semver="${SEMVER%.*}.${normalized_patch}"
5351 is_ota=false
5452
55- # OTA hotfix: multi-digit patch whose last digit is non-zero.
56- # patch % 10 != 0 → OTA hotfix (last digit = OTA iteration, remaining digits = base binary patch).
57- # patch % 10 == 0 → binary hotfix (e.g. 10, 20) or regular release (0, 00).
58- # Single-digit patches (1-9) are always binary hotfixes; 0 is a regular release.
59- if [[ ${#patch} -ge 2 && $((10#$patch % 10)) -ne 0 ]]; then
60- is_ota=true
61- echo "is_ota=true" >> "$GITHUB_OUTPUT"
62- echo "OTA hotfix (patch: ${patch}, last digit: $((10#$patch % 10))): branch release/${SEMVER}; OTA_VERSION v${SEMVER}."
53+ # Runway always creates 2-digit patches. Convention:
54+ # patch % 10 != 0 → OTA hotfix (last digit = OTA iteration, remaining = base binary patch).
55+ # patch % 10 == 0 → binary hotfix or regular release; normalized by dividing by 10.
56+ # Single-digit patches (1-9) are binary hotfixes; 0 is a regular release.
57+ #
58+ # Normalization (non-OTA, multi-digit): patch / 10 → store version.
59+ # 00 → 0 (regular release), 10 → 1, 20 → 2, etc.
60+ if [[ ${#patch} -ge 2 ]]; then
61+ numeric_patch=$((10#$patch))
62+ if [[ $((numeric_patch % 10)) -ne 0 ]]; then
63+ is_ota=true
64+ normalized_patch=$numeric_patch
65+ echo "is_ota=true" >> "$GITHUB_OUTPUT"
66+ echo "OTA hotfix (patch: ${patch}, last digit: $((numeric_patch % 10))): branch release/${SEMVER}; OTA_VERSION v${SEMVER}."
67+ else
68+ normalized_patch=$((numeric_patch / 10))
69+ echo "is_ota=false" >> "$GITHUB_OUTPUT"
70+ echo "Binary hotfix or release (patch: ${patch} → normalized ${normalized_patch})."
71+ fi
6372 else
73+ normalized_patch=$((10#$patch))
6474 echo "is_ota=false" >> "$GITHUB_OUTPUT"
65- echo "Not OTA hotfix ( patch segment: ${patch})."
75+ echo "Single-digit patch ( ${patch}): binary hotfix or release ."
6676 fi
6777
68- # Detect if patch has leading zeros requiring local version bump
69- # (e.g. 00 → normalized 0). The github-tools action rejects leading-zero patches.
78+ normalized_semver="${SEMVER%.*}.${normalized_patch}"
79+
80+ # Detect if the Runway patch differs from the normalized store version,
81+ # requiring a local version bump (github-tools rejects non-standard patches).
7082 if [[ "$patch" != "$normalized_patch" && "$is_ota" != "true" ]]; then
7183 echo "needs_local_bump=true" >> "$GITHUB_OUTPUT"
72- echo "Patch has leading zeros ( ${patch} → ${normalized_patch}) : will bump versions locally."
84+ echo "Runway patch ${patch} → store patch ${normalized_patch}: will bump versions locally."
7385 else
7486 echo "needs_local_bump=false" >> "$GITHUB_OUTPUT"
7587 fi
@@ -135,8 +147,9 @@ jobs:
135147 github-token : ${{ github.event_name == 'workflow_dispatch' && secrets.PR_TOKEN || secrets.github-token }}
136148 google-application-creds-base64 : ${{ github.event_name == 'workflow_dispatch' && secrets.GCP_RLS_SHEET_ACCOUNT_BASE64 || secrets.google-application-creds-base64 }}
137149
138- # --- Local version-bump path for Runway patches with leading zeros (e.g. 7.79.00) ---
139- # The github-tools action rejects leading-zero patches as invalid strict SemVer.
150+ # --- Local version-bump path for Runway patches that differ from store version ---
151+ # Runway 2-digit patches (e.g. 7.79.00 → 0, 7.79.10 → 1) need normalization.
152+ # The github-tools action rejects these as invalid strict SemVer.
140153 # We check out the Runway branch directly and bump versions with the normalized semver.
141154 - name : Check for existing release PR (local bump)
142155 id : local_bump_pr
0 commit comments