Skip to content

Commit 4d019d5

Browse files
Programcodeclaude
andcommitted
Fix the build-day eas init and widget credentials steps
A first non-interactive eas init needs --account and --force to link or create the project, and with an App Group the widget extension needs its own credentials entry, which the script now writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1dcfd20 commit 4d019d5

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎docs/development.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,17 @@ Go on only if all of these hold:
194194
- the profile is enterprise (`all devices` true) or ad hoc with Adam's iPhone UDID among its devices: ask Adam for the UDID. A development profile (`get-task-allow` true) is not what EAS internal distribution expects; ask Adam first;
195195
- the `.p12`'s SHA-1 equals one of the profile's certificate SHA-1s.
196196

197-
Set `DEBATELAB_APP_GROUP` (in the profile's `env` in `eas.json`) only if `app groups` lists a group. Otherwise this build has no Live Activity.
197+
Set `DEBATELAB_APP_GROUP` (in the profile's `env` in `eas.json`, and exported in this shell for step 4) only if `app groups` lists a group. Otherwise this build has no Live Activity.
198198

199199
**2. Link the EAS project, once.**
200200

201201
```bash
202202
cd apps/mobile
203203
export EXPO_TOKEN="$(cat $S/eas-token)"
204-
npx eas-cli@24.13.0 init --non-interactive
204+
npx eas-cli@24.13.0 init --account <account> --force --non-interactive
205205
```
206206

207-
`eas init` cannot edit `app.config.ts`, so it prints the project ID. Add `owner: '<account>'` and `extra: { eas: { projectId: '<id>' } }` to the config, commit, and build from that commit. Expo Go's config gains those two fields, which is expected.
207+
Without a project ID in the config, the non-interactive init needs both `--account` (the Expo account that owns the project, `adamgaborjani` on Adam's VPS) and `--force`, which links `@<account>/debatelab` if it exists and creates it otherwise. `eas init` cannot edit `app.config.ts`, so it prints the project ID. Add `owner: '<account>'` and `extra: { eas: { projectId: '<id>' } }` to the config, commit, and build from that commit. Expo Go's config gains those two fields, which is expected.
208208

209209
**3. Count the builds already used.**
210210

@@ -228,10 +228,11 @@ import json, os, sys
228228
s = sys.argv[1]
229229
cert = {'path': f'{s}/cert.p12', 'password': open(f'{s}/p12-password').read().strip()}
230230
target = {'provisioningProfilePath': f'{s}/profile.mobileprovision', 'distributionCertificate': cert}
231-
# With DEBATELAB_APP_GROUP the widget extension is a second target with its own entry:
232-
# {'ios': {'DebateLab': target, 'ExpoWidgetsTarget': target}}, with a profile valid for both.
231+
# With DEBATELAB_APP_GROUP the widget extension is a second target and needs its own entry,
232+
# signed by a profile valid for both bundle ids (a wildcard profile is).
233+
ios = {'DebateLab': target, 'ExpoWidgetsTarget': target} if os.environ.get('DEBATELAB_APP_GROUP') else target
233234
fd = os.open('credentials.json', os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
234-
os.write(fd, json.dumps({'ios': target}).encode())
235+
os.write(fd, json.dumps({'ios': ios}).encode())
235236
os.close(fd)
236237
EOF
237238
git status --short # credentials.json must not appear

0 commit comments

Comments
 (0)