@marktiderman/genesis-cli 1.22.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,32 @@
1
- # Deploy to production, started by pushing a release tag (`git tag v1.4.0 && git push origin v1.4.0`).
2
- # A release that changes native code is a new store version: bump `version` in app.config.ts in
3
- # the same change. The version isn't part of the fingerprint, so a bump on its own starts no
4
- # build, and a native change without one uploads the old version string again.
1
+ # Deploy to production on every merge to main. main is protected (pull requests only, and only the
2
+ # people allowed to merge into it), so that merge is the release's approval.
5
3
  #
6
4
  # 1. Fingerprint the native project as the production variant builds it.
7
5
  # 2. Per platform, look for a production build with that fingerprint.
8
- # - None (native code changed): build one. The store submission waits for a person to approve
9
- # it in the run's page on expo.dev.
10
- # - One exists (JavaScript only): publish an over-the-air update to the `production` channel,
11
- # also after that approval, to 10% of installs. rollout.yml raises it or rolls it back.
6
+ # - One exists (JavaScript only): publish an over-the-air update to the `production` channel, to
7
+ # every install.
8
+ # - None (native code changed): build one and submit it in the same run. Installs can't take an
9
+ # update across a native change, so the new code reaches phones through the new build.
10
+ #
11
+ # A merge that changes native code is a new store version once it's released: bump `version` in
12
+ # app.config.ts in the same change when you mean to release it. The build number goes up by itself
13
+ # (eas.json autoIncrement).
12
14
  #
13
15
  # Safety:
14
- # - A tag push is the only trigger, so a run always builds a commit in git, never a local folder.
15
- # Don't add `workflow_dispatch` without `--ref` discipline: `eas workflow:run` without `--ref`
16
- # uploads the working directory as it is on that machine.
17
- # - Nothing is submitted or published before the `approve_release` job is approved, and it isn't
18
- # offered when a build failed, so one approval never ships half a release. Check that the tag's
19
- # commit is on main before approving.
16
+ # - A push to main is the only trigger, so a run always builds a commit in git, never a local
17
+ # folder. `eas workflow:run` can start it anyway (and without `--ref` uploads the working
18
+ # directory), so the first job runs only for a push to main and a manual run does nothing.
19
+ # - Runs are serialized (`concurrency`): two quick merges never publish out of order.
20
+ # - Updates go to every install, not a staged share: EAS refuses a second rollout on the same
21
+ # channel, platform and runtime while one is in progress, so a staged update would make the next
22
+ # merge's update fail. To take one back, republish the update before it
23
+ # (`eas update:republish --group <id>`); rollout.yml does that for a staged one.
24
+ # - A build is submitted in the same run that made it, so an update never goes to a production
25
+ # build that nobody has. If a submit fails, submit that build by hand before the next merge
26
+ # (`eas submit --platform ios --id <build id> --profile production`).
20
27
  # - Builds go to TestFlight and to the Play internal track as a draft (eas.json `submit`);
21
28
  # releasing to the stores stays a person's step in App Store Connect and Play Console.
22
- # - EAS refuses to start a second rollout on the same channel, platform and runtime while one is
23
- # in progress, so a new update can't silently replace a staged one (finish it with rollout.yml).
24
- # - Each platform's update is its own update group; promote or roll back each with rollout.yml.
25
- # - A production build whose approval was rejected (or whose submit failed) still matches its
26
- # fingerprint: a later JavaScript-only tag sends an update to a binary nobody has. Submit that
27
- # build by hand first (`eas submit --platform ios --id <build id> --profile production`).
29
+ # - Each platform's build or update is its own: a failure on one doesn't hold the other back.
28
30
  #
29
31
  # Genesis template (templates/eas/workflows/deploy-production.yml). Edit the copy in your app; see
30
32
  # docs/NATIVE-RELEASE.md in the Genesis repository.
@@ -32,11 +34,19 @@ name: Deploy production
32
34
 
33
35
  on:
34
36
  push:
35
- tags: ["v*.*.*"]
37
+ branches: [main]
38
+
39
+ # One deploy at a time. The running one always finishes (no cancel_in_progress); the newest merge
40
+ # waits for it and EAS drops the runs in between, so an older merge never publishes last.
41
+ concurrency:
42
+ group: ${{ workflow.filename }}-${{ github.ref }}
36
43
 
37
44
  jobs:
38
45
  fingerprint:
39
46
  name: Fingerprint
47
+ # Only a push to main. `eas workflow:run` starts any workflow whatever its `on` says, and
48
+ # without --ref it uploads a local folder; skipping here skips every job after it.
49
+ if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
40
50
  type: fingerprint
41
51
  environment: production
42
52
  env:
@@ -83,18 +93,9 @@ jobs:
83
93
  platform: android
84
94
  profile: production
85
95
 
86
- approve_release:
87
- name: Approve submitting the builds and publishing the updates
88
- # Both lookups must have succeeded (needs) and neither build failed (after): a failure on one
89
- # platform never leaves the other to ship alone.
90
- needs: [get_ios_build, get_android_build]
91
- after: [build_ios, build_android]
92
- if: ${{ after.build_ios.status != 'failure' && after.build_android.status != 'failure' }}
93
- type: require-approval
94
-
95
96
  submit_ios:
96
97
  name: Submit iOS to TestFlight
97
- needs: [build_ios, approve_release]
98
+ needs: [build_ios]
98
99
  if: ${{ needs.build_ios.outputs.build_id }}
99
100
  type: submit
100
101
  environment: production
@@ -104,7 +105,7 @@ jobs:
104
105
 
105
106
  submit_android:
106
107
  name: Submit Android to the internal track (draft)
107
- needs: [build_android, approve_release]
108
+ needs: [build_android]
108
109
  if: ${{ needs.build_android.outputs.build_id }}
109
110
  type: submit
110
111
  environment: production
@@ -113,8 +114,8 @@ jobs:
113
114
  profile: production
114
115
 
115
116
  update_ios:
116
- name: Update iOS (10% of production installs)
117
- needs: [get_ios_build, approve_release]
117
+ name: Update iOS (every production install)
118
+ needs: [get_ios_build]
118
119
  if: ${{ needs.get_ios_build.outputs.build_id }}
119
120
  type: update
120
121
  environment: production
@@ -124,15 +125,16 @@ jobs:
124
125
  params:
125
126
  channel: production
126
127
  platform: ios
127
- rollout_percentage: 10
128
+ # No rollout_percentage: unset, the update goes to every install. Set to 100, EAS published
129
+ # it as a rollout and a consumer app's update job failed ("GraphQL request failed").
128
130
  # Explicit: unset, EAS tries a Sentry source map upload whenever @sentry/react-native is
129
131
  # installed and only logs a failure. Set true once the Sentry plugin is on in app.config.ts
130
132
  # (with SENTRY_AUTH_TOKEN), so a failed upload fails the job.
131
133
  upload_sentry_sourcemaps: false
132
134
 
133
135
  update_android:
134
- name: Update Android (10% of production installs)
135
- needs: [get_android_build, approve_release]
136
+ name: Update Android (every production install)
137
+ needs: [get_android_build]
136
138
  if: ${{ needs.get_android_build.outputs.build_id }}
137
139
  type: update
138
140
  environment: production
@@ -142,7 +144,8 @@ jobs:
142
144
  params:
143
145
  channel: production
144
146
  platform: android
145
- rollout_percentage: 10
147
+ # No rollout_percentage: unset, the update goes to every install. Set to 100, EAS published
148
+ # it as a rollout and a consumer app's update job failed ("GraphQL request failed").
146
149
  # Explicit: unset, EAS tries a Sentry source map upload whenever @sentry/react-native is
147
150
  # installed and only logs a failure. Set true once the Sentry plugin is on in app.config.ts
148
151
  # (with SENTRY_AUTH_TOKEN), so a failed upload fails the job.
@@ -1,4 +1,5 @@
1
- # Promote or roll back a staged production update (one deploy-production.yml started).
1
+ # Promote or roll back a staged production update: one published by hand with `--rollout-percentage`
2
+ # (deploy-production.yml sends every merge's update to every install).
2
3
  #
3
4
  # Run it by hand, from git:
4
5
  #
@@ -40,7 +41,7 @@ on:
40
41
  update_group_id:
41
42
  type: string
42
43
  required: true
43
- description: One platform's update group from deploy-production.yml (its update job's log, or `eas update:list --branch production`).
44
+ description: One platform's update group you published by hand with `--rollout-percentage` (`eas update:list --branch production`). deploy-production.yml publishes at 100%, which has no rollout to promote or roll back.
44
45
  action:
45
46
  type: choice
46
47
  required: true
@@ -239,8 +239,8 @@ flows; [docs/NATIVE-RELEASE.md](../../docs/NATIVE-RELEASE.md) has the setup and
239
239
  | --- | --- | --- |
240
240
  | `pr-preview.yml` | a pull request into `main` that changes the app, or one labeled `Preview` | Repack a preview build with the same fingerprint (or build one), publish an update to `pr-<number>`, comment the install link and QR code. iOS once `PREVIEW_IOS=true`. |
241
241
  | `e2e.yml` | by hand (Maestro needs a paid EAS plan) | The Maestro flows on an iOS simulator build. |
242
- | `deploy-production.yml` | a pushed `v*.*.*` tag | A store build where native code changed, else an update to `production` at 10%; both after a person approves. |
243
- | `rollout.yml` | by hand | Promote the staged update after a failed-launch check, or roll it back. |
242
+ | `deploy-production.yml` | every merge to `main` | A store build (submitted in the same run) where native code changed, else an update to every `production` install. |
243
+ | `rollout.yml` | by hand | Promote an update you staged by hand after a failed-launch check, or roll it back. |
244
244
 
245
245
  Profiles: `development`, `preview` and `production` build the `APP_VARIANT` of the same name on
246
246
  the channel of the same name; `e2e` is a development build for the simulator. Store ids in
@@ -1,30 +1,32 @@
1
- # Deploy to production, started by pushing a release tag (`git tag v1.4.0 && git push origin v1.4.0`).
2
- # A release that changes native code is a new store version: bump `version` in app.config.ts in
3
- # the same change. The version isn't part of the fingerprint, so a bump on its own starts no
4
- # build, and a native change without one uploads the old version string again.
1
+ # Deploy to production on every merge to main. main is protected (pull requests only, and only the
2
+ # people allowed to merge into it), so that merge is the release's approval.
5
3
  #
6
4
  # 1. Fingerprint the native project as the production variant builds it.
7
5
  # 2. Per platform, look for a production build with that fingerprint.
8
- # - None (native code changed): build one. The store submission waits for a person to approve
9
- # it in the run's page on expo.dev.
10
- # - One exists (JavaScript only): publish an over-the-air update to the `production` channel,
11
- # also after that approval, to 10% of installs. rollout.yml raises it or rolls it back.
6
+ # - One exists (JavaScript only): publish an over-the-air update to the `production` channel, to
7
+ # every install.
8
+ # - None (native code changed): build one and submit it in the same run. Installs can't take an
9
+ # update across a native change, so the new code reaches phones through the new build.
10
+ #
11
+ # A merge that changes native code is a new store version once it's released: bump `version` in
12
+ # app.config.ts in the same change when you mean to release it. The build number goes up by itself
13
+ # (eas.json autoIncrement).
12
14
  #
13
15
  # Safety:
14
- # - A tag push is the only trigger, so a run always builds a commit in git, never a local folder.
15
- # Don't add `workflow_dispatch` without `--ref` discipline: `eas workflow:run` without `--ref`
16
- # uploads the working directory as it is on that machine.
17
- # - Nothing is submitted or published before the `approve_release` job is approved, and it isn't
18
- # offered when a build failed, so one approval never ships half a release. Check that the tag's
19
- # commit is on main before approving.
16
+ # - A push to main is the only trigger, so a run always builds a commit in git, never a local
17
+ # folder. `eas workflow:run` can start it anyway (and without `--ref` uploads the working
18
+ # directory), so the first job runs only for a push to main and a manual run does nothing.
19
+ # - Runs are serialized (`concurrency`): two quick merges never publish out of order.
20
+ # - Updates go to every install, not a staged share: EAS refuses a second rollout on the same
21
+ # channel, platform and runtime while one is in progress, so a staged update would make the next
22
+ # merge's update fail. To take one back, republish the update before it
23
+ # (`eas update:republish --group <id>`); rollout.yml does that for a staged one.
24
+ # - A build is submitted in the same run that made it, so an update never goes to a production
25
+ # build that nobody has. If a submit fails, submit that build by hand before the next merge
26
+ # (`eas submit --platform ios --id <build id> --profile production`).
20
27
  # - Builds go to TestFlight and to the Play internal track as a draft (eas.json `submit`);
21
28
  # releasing to the stores stays a person's step in App Store Connect and Play Console.
22
- # - EAS refuses to start a second rollout on the same channel, platform and runtime while one is
23
- # in progress, so a new update can't silently replace a staged one (finish it with rollout.yml).
24
- # - Each platform's update is its own update group; promote or roll back each with rollout.yml.
25
- # - A production build whose approval was rejected (or whose submit failed) still matches its
26
- # fingerprint: a later JavaScript-only tag sends an update to a binary nobody has. Submit that
27
- # build by hand first (`eas submit --platform ios --id <build id> --profile production`).
29
+ # - Each platform's build or update is its own: a failure on one doesn't hold the other back.
28
30
  #
29
31
  # Genesis template (templates/eas/workflows/deploy-production.yml). Edit the copy in your app; see
30
32
  # docs/NATIVE-RELEASE.md in the Genesis repository.
@@ -32,11 +34,19 @@ name: Deploy production
32
34
 
33
35
  on:
34
36
  push:
35
- tags: ["v*.*.*"]
37
+ branches: [main]
38
+
39
+ # One deploy at a time. The running one always finishes (no cancel_in_progress); the newest merge
40
+ # waits for it and EAS drops the runs in between, so an older merge never publishes last.
41
+ concurrency:
42
+ group: ${{ workflow.filename }}-${{ github.ref }}
36
43
 
37
44
  jobs:
38
45
  fingerprint:
39
46
  name: Fingerprint
47
+ # Only a push to main. `eas workflow:run` starts any workflow whatever its `on` says, and
48
+ # without --ref it uploads a local folder; skipping here skips every job after it.
49
+ if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
40
50
  type: fingerprint
41
51
  environment: production
42
52
  env:
@@ -83,18 +93,9 @@ jobs:
83
93
  platform: android
84
94
  profile: production
85
95
 
86
- approve_release:
87
- name: Approve submitting the builds and publishing the updates
88
- # Both lookups must have succeeded (needs) and neither build failed (after): a failure on one
89
- # platform never leaves the other to ship alone.
90
- needs: [get_ios_build, get_android_build]
91
- after: [build_ios, build_android]
92
- if: ${{ after.build_ios.status != 'failure' && after.build_android.status != 'failure' }}
93
- type: require-approval
94
-
95
96
  submit_ios:
96
97
  name: Submit iOS to TestFlight
97
- needs: [build_ios, approve_release]
98
+ needs: [build_ios]
98
99
  if: ${{ needs.build_ios.outputs.build_id }}
99
100
  type: submit
100
101
  environment: production
@@ -104,7 +105,7 @@ jobs:
104
105
 
105
106
  submit_android:
106
107
  name: Submit Android to the internal track (draft)
107
- needs: [build_android, approve_release]
108
+ needs: [build_android]
108
109
  if: ${{ needs.build_android.outputs.build_id }}
109
110
  type: submit
110
111
  environment: production
@@ -113,8 +114,8 @@ jobs:
113
114
  profile: production
114
115
 
115
116
  update_ios:
116
- name: Update iOS (10% of production installs)
117
- needs: [get_ios_build, approve_release]
117
+ name: Update iOS (every production install)
118
+ needs: [get_ios_build]
118
119
  if: ${{ needs.get_ios_build.outputs.build_id }}
119
120
  type: update
120
121
  environment: production
@@ -124,15 +125,16 @@ jobs:
124
125
  params:
125
126
  channel: production
126
127
  platform: ios
127
- rollout_percentage: 10
128
+ # No rollout_percentage: unset, the update goes to every install. Set to 100, EAS published
129
+ # it as a rollout and a consumer app's update job failed ("GraphQL request failed").
128
130
  # Explicit: unset, EAS tries a Sentry source map upload whenever @sentry/react-native is
129
131
  # installed and only logs a failure. Set true once the Sentry plugin is on in app.config.ts
130
132
  # (with SENTRY_AUTH_TOKEN), so a failed upload fails the job.
131
133
  upload_sentry_sourcemaps: false
132
134
 
133
135
  update_android:
134
- name: Update Android (10% of production installs)
135
- needs: [get_android_build, approve_release]
136
+ name: Update Android (every production install)
137
+ needs: [get_android_build]
136
138
  if: ${{ needs.get_android_build.outputs.build_id }}
137
139
  type: update
138
140
  environment: production
@@ -142,7 +144,8 @@ jobs:
142
144
  params:
143
145
  channel: production
144
146
  platform: android
145
- rollout_percentage: 10
147
+ # No rollout_percentage: unset, the update goes to every install. Set to 100, EAS published
148
+ # it as a rollout and a consumer app's update job failed ("GraphQL request failed").
146
149
  # Explicit: unset, EAS tries a Sentry source map upload whenever @sentry/react-native is
147
150
  # installed and only logs a failure. Set true once the Sentry plugin is on in app.config.ts
148
151
  # (with SENTRY_AUTH_TOKEN), so a failed upload fails the job.
@@ -1,4 +1,5 @@
1
- # Promote or roll back a staged production update (one deploy-production.yml started).
1
+ # Promote or roll back a staged production update: one published by hand with `--rollout-percentage`
2
+ # (deploy-production.yml sends every merge's update to every install).
2
3
  #
3
4
  # Run it by hand, from git:
4
5
  #
@@ -40,7 +41,7 @@ on:
40
41
  update_group_id:
41
42
  type: string
42
43
  required: true
43
- description: One platform's update group from deploy-production.yml (its update job's log, or `eas update:list --branch production`).
44
+ description: One platform's update group you published by hand with `--rollout-percentage` (`eas update:list --branch production`). deploy-production.yml publishes at 100%, which has no rollout to promote or roll back.
44
45
  action:
45
46
  type: choice
46
47
  required: true
package/dist/vite.js CHANGED
@@ -6967,7 +6967,8 @@ async function readFigma(config, token, fetchImpl = fetch, timeoutMs = FIGMA_TIM
6967
6967
  }
6968
6968
  function compare(config, routes, targets, figma, dynamicTargets = []) {
6969
6969
  const platformOf = (page) => config.pages.web === page ? "web" : config.pages.native === page ? "native" : void 0;
6970
- const routeFrames = figma.frames.filter((f) => platformOf(f.page));
6970
+ const inProposal = (f) => /^Proposal\s*·/.test(f.section ?? "");
6971
+ const routeFrames = figma.frames.filter((f) => platformOf(f.page) && !inProposal(f));
6971
6972
  const framesFor = (r) => routeFrames.filter((f) => platformOf(f.page) === r.platform && (sameScreen(f.route, r.route) || r.route === "index" && f.route === "/"));
6972
6973
  const byId = new Map(figma.frames.map((f) => [f.id, f]));
6973
6974
  const framed = new Set(routes.flatMap((r) => framesFor(r).map((f) => f.id)));
@@ -6975,7 +6976,7 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
6975
6976
  const routesWithoutFrame = routes.filter((r) => framesFor(r).length === 0);
6976
6977
  const framesWithoutRoute = routeFrames.filter((f) => !framed.has(f.id));
6977
6978
  const proposals = {};
6978
- for (const f of figma.frames.filter((x) => x.page === config.proposalsPage)) (proposals[f.section ?? "(no section)"] ??= []).push(f);
6979
+ for (const f of figma.frames.filter((x) => x.page === config.proposalsPage || platformOf(x.page) && inProposal(x))) (proposals[f.section ?? "(no section)"] ??= []).push(f);
6979
6980
  const missingHotspots = [];
6980
6981
  const seen = /* @__PURE__ */ new Set();
6981
6982
  for (const t of targets) {
@@ -6996,11 +6997,11 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
6996
6997
  for (const h of figma.hotspots) {
6997
6998
  const from = byId.get(h.from);
6998
6999
  const to = byId.get(h.to);
6999
- if (from && to && platformOf(to.page) && !framed.has(to.id)) deadHotspots.push({ from, to });
7000
+ if (from && to && platformOf(to.page) && !inProposal(to) && !framed.has(to.id)) deadHotspots.push({ from, to });
7000
7001
  }
7001
7002
  const idMismatches = routes.filter((r) => r.figmaId && !framesFor(r).some((f) => f.id === r.figmaId)).map((r) => ({ ...r, frames: framesFor(r).map((f) => f.id) }));
7002
7003
  const wantedPages = [...Object.values(config.pages), config.proposalsPage];
7003
- const missingPages = wantedPages.filter((p) => !figma.pages.includes(p));
7004
+ const missingPages = wantedPages.filter((p) => p !== config.proposalsPage && !figma.pages.includes(p));
7004
7005
  const uncheckedNavigation = dynamicTargets.filter((t) => routes.some((r) => r.file === t.file));
7005
7006
  return {
7006
7007
  file: config.file,