Skip to content

Commit 9c5939e

Browse files
aapelivclaude
andcommitted
mobile: name native OTA releases by version, not the Expo update_id
Record an ota_version (display version + commit hash, e.g. v1.2.18355.fc38c23d) in the native OTA manifest so the published bundle is identified the same descriptive way as everything else, instead of the opaque Expo update_id UUID. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fda0ebb commit 9c5939e

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

app/.gitlab-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,11 +1063,12 @@ deploy:mobile-ota-staging:
10631063
# job, so a JS-only over-the-air update ships without a backend/web deploy.
10641064
#
10651065
# CI only stages UNSIGNED bundles. Signing and the push to the prod CDN happen
1066-
# later, in the tools/ publish_native_ota lambda — the private signing key never
1067-
# touches CI. The manifest's asset URLs are baked with the literal placeholder
1068-
# __OTA_BUNDLE_BASE__; the publish lambda substitutes the real prod CDN base
1069-
# (<cdn-root>/<update-id>) before signing, so it alone owns where the bundle
1070-
# lives and the URLs can't drift from the upload path.
1066+
# later, in the tools/ deploy lambda's publish_native_ota action — the private
1067+
# signing key never touches CI. The manifest's asset URLs are baked with the
1068+
# literal placeholder __OTA_BUNDLE_BASE__; the publish step substitutes the real
1069+
# prod CDN base (<cdn-root>/<ota-version>, e.g. v1.2.18355.fc38c23d) before
1070+
# signing, so it alone owns where the bundle lives and the URLs can't drift from
1071+
# the upload path.
10711072
build:mobile-ota-prod:
10721073
needs: ["protos"]
10731074
stage: build

app/deployment/build_native_ota_manifest.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,20 @@ mkdir -p "$(dirname "$OUTPUT_PATH")"
3232

3333
BASE="https://${CI_COMMIT_SHORT_SHA}--native-ota.${PREVIEW_DOMAIN}"
3434

35+
# Descriptive, immutable release name the publish step uses as the CDN path
36+
# segment, e.g. v1.2.18355.fc38c23d — the release display version (app/version
37+
# + commit number) plus the short commit hash. Built from clean components so it
38+
# keeps this form regardless of which branch the bundle was built on.
39+
OTA_VERSION="$(cat app/version).${COMMIT_NUMBER}.${CI_COMMIT_SHORT_SHA}"
40+
3541
cat > "$OUTPUT_PATH" <<EOF
3642
{
3743
"commit_sha": "${CI_COMMIT_SHA}",
3844
"commit_short_sha": "${CI_COMMIT_SHORT_SHA}",
3945
"commit_number": ${COMMIT_NUMBER},
4046
"slug": "${SLUG}",
4147
"display_version": "${DISPLAY_VERSION}",
48+
"ota_version": "${OTA_VERSION}",
4249
"branch": "${CI_COMMIT_REF_NAME}",
4350
"timestamp": "${CI_COMMIT_TIMESTAMP}",
4451
"pipeline_id": "${CI_PIPELINE_ID}",

0 commit comments

Comments
 (0)