A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
TypeScript agent-skillsaidsh-pluginhacktoberfestjavascriptmcp-serverreactresume-builderself-hostedtypescript
chore: update mobile beta distribution and organize internal docs
Amruth Pillai10e452530d18
diff --git a/docs/agents/container-publishing.md b/.agents/docs/container-publishing.mdsimilarity index 99%rename from docs/agents/container-publishing.mdrename to .agents/docs/container-publishing.mdindex 01cbf7306..c568005f3 100644--- a/docs/agents/container-publishing.md+++ b/.agents/docs/container-publishing.md@@ -92,7 +92,7 @@ at launch, downloaded in the background, and applied on the next restart.Before first use, add `EXPO_TOKEN`, create preview/production EAS channels, and distributenew builds with these channels and update configuration. Existing binaries without-`expo-updates` cannot receive OTA updates. See [mobile release handoff](../contributing/mobile-release-handoff.md#over-the-air-updates)+`expo-updates` cannot receive OTA updates. See [mobile release handoff](./mobile-release-handoff.md#over-the-air-updates)for setup, rollback, and remaining verification. Keep APIs compatible with older clientsand self-hosted servers; runtime fingerprints only protect the JavaScript/native boundary.diff --git a/docs/contributing/dependency-upgrades.md b/.agents/docs/dependency-upgrades.mdsimilarity index 100%rename from docs/contributing/dependency-upgrades.mdrename to .agents/docs/dependency-upgrades.mddiff --git a/docs/agents/issue-tracker.md b/.agents/docs/issue-tracker.mdsimilarity index 100%rename from docs/agents/issue-tracker.mdrename to .agents/docs/issue-tracker.mddiff --git a/docs/contributing/microsoft-store-handoff.md b/.agents/docs/microsoft-store-handoff.mdsimilarity index 100%rename from docs/contributing/microsoft-store-handoff.mdrename to .agents/docs/microsoft-store-handoff.mddiff --git a/docs/contributing/mobile-ci.md b/.agents/docs/mobile-ci.mdsimilarity index 85%rename from docs/contributing/mobile-ci.mdrename to .agents/docs/mobile-ci.mdindex 04b6a3a0a..396ded80b 100644--- a/docs/contributing/mobile-ci.md+++ b/.agents/docs/mobile-ci.md@@ -17,9 +17,12 @@ changes reach `main`; no Blacksmith app build or store upload was run during set## One-time migrationEnable Blacksmith for this repository and confirm your plan covers macOS runners.-The workflow uses `blacksmith-6vcpu-macos-26` with the image's default Xcode and records-its version in each iOS artifact. Check Apple's current minimum SDK requirements before-uploading. Ruby, Fastlane and CocoaPods dependencies are locked under `tooling/mobile`.+The workflows use `blacksmith-12vcpu-macos-latest` for iOS and Forme native prebuilds,+and `blacksmith-32vcpu-ubuntu-2404` for all their Linux jobs. Android builds cross-compile+device ABIs on the x64 Linux host; an ARM runner is not required. The latest macOS image+and its default Xcode can change; each iOS artifact records the Xcode version. Check+Apple's current minimum SDK requirements before uploading. Ruby, Fastlane and CocoaPods+dependencies are locked under `tooling/mobile`.Download the **existing** Android upload keystore and iOS distribution certificate(including its private key) and App Store provisioning profile using `eas credentials`@@ -91,11 +94,16 @@ paths are manual, and signing is limited to `main`.or public sideload distribution are created.4. Dispatch with **upload** enabled when ready. Upload jobs start only after everyselected platform built successfully, then pass the `mobile-store` environment gate.- They upload the exact signed artifacts from that run. Android goes to an **internal- draft**; iOS uploads to App Store Connect without external tester distribution or- App Review submission. Upload success does not prove store processing succeeded.-5. Finish TestFlight/Play tester distribution, signed-device QA, store declarations,- review submission and production rollout in the consoles. Follow the+ They publish the exact signed artifacts from that run. Android creates a **completed+ release on the internal testing track**, then promotes that exact version to every+ other existing testing track, including open and closed beta tracks. Production+ tracks are excluded. iOS waits for processing and assigns the build to **all existing+ TestFlight groups**, internal and external, submitting for beta review and notifying+ external testers when applicable. Configure at least one TestFlight group first.+ Store-side processing and beta review can delay availability; public store releases+ remain separate.+5. Confirm tester access, complete signed-device QA and store declarations, then+ submit for public review and production rollout in the consoles. Follow the[release handoff](./mobile-release-handoff.md#signed-device-test-matrix).CI creates temporary signing files with restrictive permissions, imports the Applediff --git a/docs/contributing/mobile-release-handoff.md b/.agents/docs/mobile-release-handoff.mdsimilarity index 95%rename from docs/contributing/mobile-release-handoff.mdrename to .agents/docs/mobile-release-handoff.mdindex f97d0f764..cd4160fc5 100644--- a/docs/contributing/mobile-release-handoff.md+++ b/.agents/docs/mobile-release-handoff.md@@ -46,7 +46,7 @@ The checked-in `.github/workflows/docker-build.yml` currently behaves as follows- Current SSH command runs `cd docker` then `./manage_stack.sh up reactive_resume`. Verify the actual VPS script pulls the intended image and updates every replica.- GHCR is primary; Docker Hub is a best-effort mirror. A successful workflow may still have failed mirror steps. Confirm the registry/tag/digest consumed by Swarm.-Before invoking a promotion, follow [container publishing](../agents/container-publishing.md). Pushing this feature branch alone does not build or deploy the production Docker image. Do not assume an unrelated external pull trigger follows the same rules; verify its actual execution and the running image digest.+Before invoking a promotion, follow [container publishing](./container-publishing.md). Pushing this feature branch alone does not build or deploy the production Docker image. Do not assume an unrelated external pull trigger follows the same rules; verify its actual execution and the running image digest.### Over-the-air updates@@ -157,10 +157,10 @@ binaries and deploy the backend first.1. Deploy the backend first. Keep the API backward compatible: older binaries and OTA bundles remain in use.2. Optionally bump `version` in `apps/mobile/app.config.ts` (for example `1.0.0` to `1.1.0`). CI supplies increasing iOS build numbers and Android version codes. iOS needs a new version string after a version is released; Play needs only a higher `versionCode`.3. Dispatch **Mobile Release** on `main`, platform `all`. The [Blacksmith setup guide](./mobile-ci.md) covers migrating existing signing credentials, seeding `MOBILE_BUILD_NUMBER_BASE`, and configuring the `mobile-store` approval environment. Build without uploads first to verify signing. No EAS Build credits are used.-4. Dispatch with **upload** enabled to send the signed artifacts to App Store Connect and Play's internal draft track. This does not submit App Review, distribute to external testers, or publish a production release. Fastlane signs locally using existing credentials and does not synchronize Apple capabilities. If exporting credentials through `eas credentials`, keep `EXPO_NO_CAPABILITY_SYNC=1`; Apple sign-in uses web Services ID `me.rxresu.web`, so turning off its primary App ID's Sign in with Apple capability would break sign-in.+4. Dispatch with **upload** enabled to publish the signed artifacts to every existing Play testing track and all existing TestFlight groups, including external beta groups. iOS waits for processing and submits for TestFlight beta review where required; configure at least one TestFlight group first. This does not submit public App Store review or publish a production release. Fastlane signs locally using existing credentials and does not synchronize Apple capabilities. If exporting credentials through `eas credentials`, keep `EXPO_NO_CAPABILITY_SYNC=1`; Apple sign-in uses web Services ID `me.rxresu.web`, so turning off its primary App ID's Sign in with Apple capability would break sign-in.5. **App Store Connect:** wait for processing, test through TestFlight, create the new app version, attach the build, write "What's New", and submit for review. Release manually or automatically after approval.-6. **Play Console:** the build lands in the `internal` track as a draft. Roll it out to testers, then promote it to production with release notes. Use a staged rollout for risky changes.+6. **Play Console:** the build is published on `internal` and promoted to every other existing non-production testing track. After testing, promote it to production with release notes. Use a staged rollout for risky changes.7. Run the [signed-device test matrix](#signed-device-test-matrix) on the store-installed builds before promoting to production.8. Confirm that a later OTA update reaches the new binary, because its fingerprint and runtime version changed.diff --git a/docs/contributing/mobile-store-review.md b/.agents/docs/mobile-store-review.mdsimilarity index 100%rename from docs/contributing/mobile-store-review.mdrename to .agents/docs/mobile-store-review.mddiff --git a/docs/plans/job-saving-release.md b/.agents/docs/plans/job-saving-release.mdsimilarity index 100%rename from docs/plans/job-saving-release.mdrename to .agents/docs/plans/job-saving-release.mddiff --git a/docs/research/job-integrations-2026-09-30.md b/.agents/docs/research/job-integrations-2026-09-30.mdsimilarity index 100%rename from docs/research/job-integrations-2026-09-30.mdrename to .agents/docs/research/job-integrations-2026-09-30.mddiff --git a/docs/research/reactive-resume-v6-launch-media-2026-10-02.md b/.agents/docs/research/reactive-resume-v6-launch-media-2026-10-02.mdsimilarity index 100%rename from docs/research/reactive-resume-v6-launch-media-2026-10-02.mdrename to .agents/docs/research/reactive-resume-v6-launch-media-2026-10-02.mddiff --git a/.github/workflows/mobile-forme-native.yml b/.github/workflows/mobile-forme-native.ymlindex 6dd42e188..dc4ae9b38 100644--- a/.github/workflows/mobile-forme-native.yml+++ b/.github/workflows/mobile-forme-native.yml@@ -13,7 +13,7 @@ permissions:jobs:prebuilt:- runs-on: ${{ vars.USE_BLACKSMITH == 'true' && 'blacksmith-6vcpu-macos-26' || 'macos-26' }}+ runs-on: blacksmith-12vcpu-macos-latesttimeout-minutes: 60outputs:tag: ${{ steps.artifact.outputs.tag }}@@ -78,7 +78,7 @@ jobs:publish:needs: prebuiltif: inputs.publish- runs-on: ubuntu-latest+ runs-on: blacksmith-32vcpu-ubuntu-2404timeout-minutes: 5permissions:contents: writediff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.ymlindex 492e916e3..a5773fb9f 100644--- a/.github/workflows/mobile-release.yml+++ b/.github/workflows/mobile-release.yml@@ -9,7 +9,7 @@ on:options: [all, android, ios]default: allupload:- description: Upload to TestFlight / Play internal draft (never submit review or publish)+ description: Publish to all Play testing tracks and TestFlight groups (no production release)type: booleandefault: false@@ -30,7 +30,7 @@ env:jobs:prepare:if: github.ref == 'refs/heads/main'- runs-on: blacksmith-2vcpu-ubuntu-2404+ runs-on: blacksmith-32vcpu-ubuntu-2404timeout-minutes: 5outputs:build_number: ${{ steps.release.outputs.build_number }}@@ -79,7 +79,7 @@ jobs:fail-fast: falsematrix:platform: ${{ fromJSON(needs.prepare.outputs.platforms) }}- runs-on: ${{ matrix.platform == 'ios' && 'blacksmith-6vcpu-macos-26' || 'blacksmith-8vcpu-ubuntu-2404' }}+ runs-on: ${{ matrix.platform == 'ios' && 'blacksmith-12vcpu-macos-latest' || 'blacksmith-32vcpu-ubuntu-2404' }}timeout-minutes: 90env:PLATFORM: ${{ matrix.platform }}@@ -101,6 +101,8 @@ jobs:working-directory: tooling/mobile- name: Check signing file handlingrun: bundle exec ruby tooling/mobile/signing_test.rb+ - name: Check beta distribution targets+ run: ruby tooling/mobile/distribution_test.rb- uses: actions/setup-java@v5if: matrix.platform == 'android'with:@@ -161,9 +163,10 @@ jobs:fail-fast: falsematrix:platform: ${{ fromJSON(needs.prepare.outputs.platforms) }}- runs-on: ${{ matrix.platform == 'ios' && 'blacksmith-6vcpu-macos-26' || 'blacksmith-2vcpu-ubuntu-2404' }}+ runs-on: ${{ matrix.platform == 'ios' && 'blacksmith-12vcpu-macos-latest' || 'blacksmith-32vcpu-ubuntu-2404' }}timeout-minutes: 30env:+ MOBILE_BUILD_NUMBER: ${{ needs.prepare.outputs.build_number }}BUNDLE_GEMFILE: ${{ github.workspace }}/tooling/mobile/Gemfilesteps:- uses: useblacksmith/checkout@v1@@ -178,7 +181,7 @@ jobs:with:name: mobile-${{ matrix.platform }}-${{ needs.prepare.outputs.build_number }}path: ${{ runner.temp }}/mobile-release- - name: Upload without review or production rollout+ - name: Publish to beta testers without production rolloutworking-directory: tooling/mobileenv:PLATFORM: ${{ matrix.platform }}diff --git a/.gitignore b/.gitignoreindex e6cb292ee..faca4c295 100644--- a/.gitignore+++ b/.gitignore@@ -49,7 +49,8 @@ temp# AI.codex-.agents+.agents/*+!.agents/docs/.claude.cursor.mcp.jsondiff --git a/AGENTS.md b/AGENTS.mdindex 36a9d8cea..2a0f3e142 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,6 +1,6 @@# Reactive Resume: agent instructions-This file applies across the repository. Follow a closer `AGENTS.md` when one exists. Keep this guide focused on agent workflows; user-facing documentation lives in `README.md` and `docs/`. Format guidance: [agents.md](https://agents.md/).+This file applies across the repository. Follow a closer `AGENTS.md` when one exists. Keep this guide focused on agent workflows. Keep `docs/` for public product, integration, self-hosting, and contributor guides; agent instructions, internal runbooks, plans, and research belong in `.agents/docs/`. Format guidance: [agents.md](https://agents.md/).<!-- caveman-begin -->@@ -35,7 +35,7 @@ This block is written and re-added by `turbo` before repository-scoped commands## Agent skills-- Issues and specs: GitHub Issues for `reactive-resume/reactive-resume`. See `docs/agents/issue-tracker.md`.+- Issues and specs: GitHub Issues for `reactive-resume/reactive-resume`. See `.agents/docs/issue-tracker.md`.- Check `git status --short` before editing. Preserve unrelated changes, including existing edits in this file.- Use scripts and configuration as the source of truth when documentation disagrees with them.@@ -131,8 +131,8 @@ Narrow cross-cutting helpers go in `packages/utils` only after checking no domai## Native mobile app-- **Feature parity is required.** The web app and the native mobile app must always offer the same user-facing features. A change that adds, removes, or changes a feature in `apps/web` must make the matching change in `apps/mobile` in the same work, and the reverse. Share logic through workspace packages (`packages/api`, `packages/schema`, `packages/resume`, `packages/pdf`) rather than duplicating it. An exception forced by store policy (for example, the hidden iOS Donate row) needs the owner's explicit decision and a note in `docs/contributing/mobile-release-handoff.md`.-- **Over-the-air update or new store build.** The runtime version uses an Expo fingerprint (`apps/mobile/fingerprint.config.js`). JavaScript, styling, copy, translation, and bundled-asset changes ship as an EAS Update: a stable Docker release publishes it to the `production` channel automatically, and no store submission is needed. A change to native code needs a new store build: native dependencies or config plugins, permissions or entitlements, `app.config.ts` native fields (icon, splash, schemes, associated domains), Expo SDK upgrades, `apps/mobile/patches`, or Forme native sources and `packages/forme-native/scripts/prebuilt.json`. Run `eas fingerprint:compare <installed native fingerprint hash> --environment production` from `apps/mobile` to check; save each Blacksmith build's `fingerprint.json` with the store release record. A changed fingerprint means a new store build. Native binaries and optional store uploads use `.github/workflows/mobile-release.yml` on Blacksmith, not EAS Build/Submit. Setup: `docs/contributing/mobile-ci.md`. Release steps: `docs/contributing/mobile-release-handoff.md` → **Releasing a new version**.+- **Feature parity is required.** The web app and the native mobile app must always offer the same user-facing features. A change that adds, removes, or changes a feature in `apps/web` must make the matching change in `apps/mobile` in the same work, and the reverse. Share logic through workspace packages (`packages/api`, `packages/schema`, `packages/resume`, `packages/pdf`) rather than duplicating it. An exception forced by store policy (for example, the hidden iOS Donate row) needs the owner's explicit decision and a note in `.agents/docs/mobile-release-handoff.md`.+- **Over-the-air update or new store build.** The runtime version uses an Expo fingerprint (`apps/mobile/fingerprint.config.js`). JavaScript, styling, copy, translation, and bundled-asset changes ship as an EAS Update: a stable Docker release publishes it to the `production` channel automatically, and no store submission is needed. A change to native code needs a new store build: native dependencies or config plugins, permissions or entitlements, `app.config.ts` native fields (icon, splash, schemes, associated domains), Expo SDK upgrades, `apps/mobile/patches`, or Forme native sources and `packages/forme-native/scripts/prebuilt.json`. Run `eas fingerprint:compare <installed native fingerprint hash> --environment production` from `apps/mobile` to check; save each Blacksmith build's `fingerprint.json` with the store release record. A changed fingerprint means a new store build. Native binaries and optional store uploads use `.github/workflows/mobile-release.yml` on Blacksmith, not EAS Build/Submit. Setup: `.agents/docs/mobile-ci.md`. Release steps: `.agents/docs/mobile-release-handoff.md` → **Releasing a new version**.- Old binaries and old OTA bundles stay in use for weeks. Keep API changes backward compatible, and deploy the backend before releasing mobile changes that depend on it. Never bump the runtime version to force an incompatible update onto old binaries.## Package boundaries@@ -230,7 +230,7 @@ docker compose up -d --build- `vercel.json` defines Vercel Services (project framework must be `Services`): `frontend` (`apps/web`, static `dist`) and `backend` (`apps/server`, entrypoint `apps/server/vercel.mjs` re-exporting the tsdown build). The backend build runs `pnpm build` for both apps, then `node apps/server/dist/prepare-deployment.mjs`. Top-level rewrites send paths whose last segment has a file extension to `frontend` and everything else, including HTML shells, to `backend`, except the server-owned paths listed first. The Function uses Node 24 and a 300-second budget. `outputDirectory: "."` on `backend` stops the builder from treating `dist/index.mjs` (the Docker entrypoint) as the handler.- Vercel environment normalization accepts `POSTGRES_URL`, direct/unpooled DB aliases, and `KV_URL`. `APP_URL` can be derived from Vercel host variables. Blob is the default when no S3 credentials are set. Preview deployments require isolated resources before enabling `ALLOW_PREVIEW_MIGRATIONS=true`; see `docs/self-hosting/vercel.mdx`.- `.github/workflows/e2e.yml` gates core unit/browser flows; `vercel.yml` builds and checks the serverless artifact on PRs and pushes to `main`. `autofix.yml` runs write-capable `pnpm knip --fix` and `pnpm check`. GitHub runners are the default; `USE_BLACKSMITH=true` switches runners and paired actions.-- `docker-build.yml` publishes native AMD64/ARM64 images. `main` publishes nightly aliases; release tags/explicit release dispatch publish stable aliases and can trigger configured production integrations. See `docs/agents/container-publishing.md` before release work.+- `docker-build.yml` publishes native AMD64/ARM64 images. `main` publishes nightly aliases; release tags/explicit release dispatch publish stable aliases and can trigger configured production integrations. See `.agents/docs/container-publishing.md` before release work.- Deployment smoke tests create/delete accounts and files; run only against a dedicated test installation. Details: `docs/contributing/deployment-checks.mdx`.## Security and pull requestsdiff --git a/apps/mobile/eas.json b/apps/mobile/eas.jsonindex 7e2cef2a8..0db134991 100644--- a/apps/mobile/eas.json+++ b/apps/mobile/eas.json@@ -35,7 +35,7 @@},"android": {"track": "internal",- "releaseStatus": "draft"+ "releaseStatus": "completed"}}}diff --git a/apps/mobile/store/README.md b/apps/mobile/store/README.mdindex 787f29e53..f690e02ab 100644--- a/apps/mobile/store/README.md+++ b/apps/mobile/store/README.md@@ -20,4 +20,4 @@ The final local set contains 165 opaque PNGs plus matching editable SVGs acrossThe seven runtime icon/splash PNGs under `../assets` remain the supplied artwork used in iOS build 4 and Android build 5. Configuration uses those paths directly. PWA derivatives use the same artwork and need a normal web deployment before users receive changes. Listing archives and editable design exports remain excluded from Git.-Validate copy after changes: app name and Apple subtitle 30 characters, Google short description 80, full description 4,000, Apple keywords 100, and Apple promotional text 170. Runtime, live-provider, physical-device, and store-review gates remain separate from artwork uploads; see `docs/contributing/mobile-release-handoff.md`.+Validate copy after changes: app name and Apple subtitle 30 characters, Google short description 80, full description 4,000, Apple keywords 100, and Apple promotional text 170. Runtime, live-provider, physical-device, and store-review gates remain separate from artwork uploads; see `.agents/docs/mobile-release-handoff.md`.diff --git a/docs/contributing/development.mdx b/docs/contributing/development.mdxindex 7a4223f26..49eb1828e 100644--- a/docs/contributing/development.mdx+++ b/docs/contributing/development.mdx@@ -242,7 +242,6 @@ Then run `pnpm lingui:extract`. It updates the catalogs in `apps/web/locales/*.p- [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) checks code, including native React Compiler and accessibility rules. [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) formats with tabs, double quotes, and 120-column lines. It sorts imports into type, Node, test, external, workspace, and local groups, and sorts Tailwind classes in `clsx`, `cva`, and `cn`. Side-effect imports retain their order. Install the recommended Oxc editor extension for fixes and formatting on save.- Configure lint rules in the root `vite.config.ts` lint block and formatting in its `fmt` block. Generated files and byte-sensitive CSS fixtures stay excluded. Async test doubles are exempt from `require-await`; source functions still require it. The Playwright fixture adapter is exempt from `rules-of-hooks` because its `use` callback belongs to Playwright. CSS declarations are formatted, but Oxlint does not lint them.- [`@shadcn/lint`](https://github.com/shadcn-ui/lint) is registered with Oxlint. Design-system rules are opt-in; add your chosen rules in the root `vite.config.ts` lint block, scoped to `apps/web` and `packages/ui`. Existing `components.json` files identify the shared component exports and Tailwind theme. See its [rules](https://github.com/shadcn-ui/lint#rules) and [configuration examples](https://github.com/shadcn-ui/lint/blob/main/docs/design-systems.md).-- Coding agents should run `pnpm exec vp lint --fix <changed paths>`, then `pnpm exec vp fmt <changed paths>`, and finish with `pnpm lint:agent` and `pnpm format:check`. Follow the [Oxc coding-agent workflow](https://oxc.rs/docs/guide/usage/coding-agents.html); fix findings and give any necessary inline suppression a rule-specific explanation.- React components with explicit props use a named props type, such as `type FooProps = {...}` with `function Foo(props: FooProps)`.## Commits and pull requestsdiff --git a/tooling/mobile/distribution_test.rb b/tooling/mobile/distribution_test.rbnew file mode 100644index 000000000..1ebec5f83--- /dev/null+++ b/tooling/mobile/distribution_test.rb@@ -0,0 +1,146 @@+require "tmpdir"++# Exercise the real lanes at the store SDK boundary without credentials or network calls.+class DistributionContract+ attr_reader :uploads++ def initialize+ @lanes = {}+ @uploads = []+ instance_eval(File.read(File.join(__dir__, "fastlane/Fastfile")), File.join(__dir__, "fastlane/Fastfile"))+ end++ def desc(_description); end++ def platform(name)+ @platform = name+ yield+ end++ def lane(name, &block)+ @lanes[[@platform, name]] = block+ end++ def publish(platform)+ instance_exec(&@lanes.fetch([platform, :upload]))+ end++ def app_store_connect_api_key(**_options)+ { fixture: true }+ end++ def upload_to_play_store(**options)+ @uploads << options+ end++ def upload_to_testflight(**options)+ @uploads << options+ end+end++module Supply+ class Client+ class << self+ attr_accessor :track_names, :read_error, :aborted++ def make_from_config+ new+ end+ end++ def begin_edit(package_name:)+ raise "Unexpected Play app" unless package_name == "me.rxresu"+ self.class.aborted = false+ end++ def tracks+ raise self.class.read_error if self.class.read_error+ self.class.track_names.map { |name| Struct.new(:track).new(name) }+ end++ def abort_current_edit+ self.class.aborted = true+ end+ end+end++module Spaceship+ module ConnectAPI+ class App+ class << self+ attr_accessor :groups++ def get(app_id:)+ raise "Unexpected App Store app" unless app_id == "6823975835"+ new+ end+ end++ def get_beta_groups+ self.class.groups+ end+ end+ end+end++module UI+ def self.user_error!(message)+ raise message+ end+end++ENV["RUNNER_TEMP"] = Dir.tmpdir+ENV["MOBILE_BUILD_NUMBER"] = "100"+%w[GOOGLE_PLAY_SERVICE_ACCOUNT_JSON ASC_KEY_ID ASC_ISSUER_ID ASC_PRIVATE_KEY].each { |name| ENV[name] = "fixture" }+contract = DistributionContract.new+Supply::Client.track_names = ["production", "internal", "alpha", "beta", "closed-qa", "wear:production"]+contract.publish(:android)+play = contract.uploads.first+raise "Play release must reach internal testers" unless play[:track] == "internal" && play[:release_status] == "completed"+promotions = contract.uploads.drop(1)+raise "Every existing Play testing track must receive the build" unless+ promotions.map { |options| options[:track_promote_to] } == ["alpha", "beta", "closed-qa"]+raise "Promotions must use this exact binary and publish a completed release" unless promotions.all? { |options|+ options[:track] == "internal" && options[:version_code] == 100 &&+ options[:track_promote_release_status] == "completed" && options[:skip_upload_aab]+}+raise "Track discovery must close its read edit" unless Supply::Client.aborted++group = Struct.new(:id, :is_internal_group)+Spaceship::ConnectAPI::App.groups = [group.new("internal-team", true), group.new("external-beta", false), group.new("internal-qa", true)]+contract.publish(:ios)+testflight = contract.uploads.last+raise "TestFlight must wait and distribute" unless+ testflight[:skip_submission] == false && testflight[:skip_waiting_for_build_processing] == false+raise "Every existing TestFlight group must receive the build" unless+ testflight[:groups] == ["internal-team", "external-beta", "internal-qa"]+raise "External TestFlight testers require beta review and notification" unless+ testflight[:distribute_external] && testflight[:submit_beta_review] && testflight[:notify_external_testers] &&+ !testflight[:changelog].empty?++Spaceship::ConnectAPI::App.groups = [group.new("internal-team", true)]+contract.publish(:ios)+testflight = contract.uploads.last+raise "Internal-only TestFlight groups need no external beta review" unless+ testflight[:distribute_external] == false && testflight[:submit_beta_review] == false++Spaceship::ConnectAPI::App.groups = []+uploaded = contract.uploads.length+begin+ contract.publish(:ios)+ raise "Missing groups must prevent upload"+rescue RuntimeError => error+ raise unless error.message == "Configure a TestFlight testing group before publishing"+end+raise "Missing groups must not upload" unless contract.uploads.length == uploaded++Supply::Client.read_error = RuntimeError.new("Track discovery failed")+begin+ contract.publish(:android)+ raise "Track discovery errors must prevent promotions"+rescue RuntimeError => error+ raise unless error.message == "Track discovery failed"+end+raise "Track discovery failure must close its edit without promotions" unless+ Supply::Client.aborted && contract.uploads.length == uploaded + 1+puts "Distribution contracts passed"diff --git a/tooling/mobile/fastlane/Fastfile b/tooling/mobile/fastlane/Fastfileindex 87495c877..817b99da7 100644--- a/tooling/mobile/fastlane/Fastfile+++ b/tooling/mobile/fastlane/Fastfile@@ -36,16 +36,31 @@ platform :android doendend- desc "Upload only to a draft on Play's internal track"+ desc "Publish to every existing Play testing track"lane :upload do- upload_to_play_store(+ options = {package_name: "me.rxresu",- aab: File.join(OUTPUT, "ReactiveResume.aab"),json_key_data: ENV.fetch("GOOGLE_PLAY_SERVICE_ACCOUNT_JSON"),- track: "internal", release_status: "draft",+ track: "internal", release_status: "completed",skip_upload_apk: true, skip_upload_metadata: true, skip_upload_changelogs: true,skip_upload_images: true, skip_upload_screenshots: true- )+ }+ version_code = Integer(ENV.fetch("MOBILE_BUILD_NUMBER"), 10)+ upload_to_play_store(**options, aab: File.join(OUTPUT, "ReactiveResume.aab"))++ client = Supply::Client.make_from_config+ client.begin_edit(package_name: "me.rxresu")+ begin+ tracks = client.tracks.map(&:track).reject { |track| track == "internal" || track.split(":").last == "production" }+ ensure+ client.abort_current_edit+ end+ tracks.each do |track|+ upload_to_play_store(+ **options, skip_upload_aab: true, track_promote_to: track,+ track_promote_release_status: "completed", version_code: version_code+ )+ endendend@@ -101,16 +116,21 @@ platform :ios doendend- desc "Upload to App Store Connect without review submission or external distribution"+ desc "Publish to all existing TestFlight groups"lane :upload doapi_key = app_store_connect_api_key(key_id: ENV.fetch("ASC_KEY_ID"), issuer_id: ENV.fetch("ASC_ISSUER_ID"),key_content: ENV.fetch("ASC_PRIVATE_KEY"))+ groups = Spaceship::ConnectAPI::App.get(app_id: "6823975835").get_beta_groups+ UI.user_error!("Configure a TestFlight testing group before publishing") if groups.empty?+ external = groups.any? { |group| !group.is_internal_group }upload_to_testflight(api_key: api_key, app_identifier: "me.rxresu", apple_id: "6823975835",ipa: File.join(OUTPUT, "ReactiveResume.ipa"),- skip_submission: true, skip_waiting_for_build_processing: true, distribute_external: false+ skip_submission: false, skip_waiting_for_build_processing: false,+ groups: groups.map(&:id), distribute_external: external, submit_beta_review: external,+ notify_external_testers: true, changelog: "Please test resume editing, PDF export and account sign-in.")endend