Skip to content

Commit 76e0a6f

Browse files
committed
fix base branch issue
1 parent 552f6b0 commit 76e0a6f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.github/workflows/runway_ios_rc_workflow.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ on:
2323
type: string
2424

2525
permissions:
26-
contents: write # required by build.yml (update-build-version job)
26+
contents: write # required by build.yml (update-build-version job)
2727
pull-requests: read
2828
actions: write
29-
id-token: write # required by build.yml
29+
id-token: write # required by build.yml
3030

3131
jobs:
3232
decide:
@@ -72,9 +72,10 @@ jobs:
7272
id: decide
7373
run: |
7474
set -e
75-
# Version from package.json (e.g. 7.71.0)
75+
# Version from package.json (e.g. 7.70.0) → base ref for OTA workflow is always v{VERSION}
7676
VERSION=$(node -p "require('./package.json').version")
7777
RELEASE_TAG="v${VERSION}"
78+
echo "base_ref=${RELEASE_TAG}" >> "$GITHUB_OUTPUT"
7879
7980
# Extract OTA_VERSION from line 9 (format: export const OTA_VERSION: string = 'vX.Y.Z';)
8081
extract_ota() { sed -n '9p' "$1" | sed "s/.*'\\([^']*\\)'.*/\1/"; }
@@ -83,17 +84,15 @@ jobs:
8384
CURRENT_OTA=$(extract_ota app/constants/ota.ts)
8485
echo "ota_version=${CURRENT_OTA}" >> "$GITHUB_OUTPUT"
8586
86-
# Resolve base ref for comparison and for OTA workflow (fingerprint comparison)
87-
# Prefer release tag; when tag does not exist (e.g. release branch before tag is cut), use main
87+
# Ref to compare against for detecting bump: use release tag if it exists, else main
8888
if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1; then
89-
BASE_REF="$RELEASE_TAG"
90-
BASE_OTA=$(git show "${BASE_REF}:app/constants/ota.ts" 2>/dev/null | sed -n '9p' | sed "s/.*'\\([^']*\\)'.*/\1/" || echo "")
89+
COMPARE_REF="$RELEASE_TAG"
90+
BASE_OTA=$(git show "${COMPARE_REF}:app/constants/ota.ts" 2>/dev/null | sed -n '9p' | sed "s/.*'\\([^']*\\)'.*/\1/" || echo "")
9191
else
92-
BASE_REF="main"
92+
COMPARE_REF="main"
9393
BASE_OTA=$(git show "origin/main:app/constants/ota.ts" 2>/dev/null | sed -n '9p' | sed "s/.*'\\([^']*\\)'.*/\1/" || echo "")
94-
echo "Release tag ${RELEASE_TAG} not found; comparing OTA_VERSION to ${BASE_REF}"
94+
echo "Release tag ${RELEASE_TAG} not found; comparing OTA_VERSION to ${COMPARE_REF} to detect bump"
9595
fi
96-
echo "base_ref=${BASE_REF}" >> "$GITHUB_OUTPUT"
9796
9897
if [[ -n "$BASE_OTA" && "$CURRENT_OTA" != "$BASE_OTA" ]]; then
9998
echo "ota_bump=true" >> "$GITHUB_OUTPUT"

app/constants/ota.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import otaConfig from '../../ota.config.js';
66
* Reset to v0 when releasing a new native build
77
* We keep this OTA_VERSION here to because changes in ota.config.js will affect the fingerprint and break the workflow in Github Actions
88
*/
9-
export const OTA_VERSION: string = 'v7.70.1';
9+
export const OTA_VERSION: string = 'v7.71.1';
1010
export const RUNTIME_VERSION = otaConfig.RUNTIME_VERSION;
1111
export const PROJECT_ID = otaConfig.PROJECT_ID;
1212
export const UPDATE_URL = otaConfig.UPDATE_URL;

0 commit comments

Comments
 (0)