@radhya/mach 2.0.34 → 2.0.36

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.
package/README.md CHANGED
@@ -148,6 +148,8 @@ For Expo apps, `mach ota setup` writes `ota` config and wires `@radhya/mach/expo
148
148
 
149
149
  Command flags always win over config values. For example, `mach ota publish --channel staging --runtime-version 1.2.0` overrides `ota.channel` and `ota.runtimeVersion`.
150
150
 
151
+ Runtime version is the OTA compatibility boundary. Mach resolves Expo-style `appVersion`, `sdkVersion`, and `nativeVersion` policies, stores the resolved runtime on each build, and serves OTA updates only to matching platform/channel/runtime combinations.
152
+
151
153
  Vanilla React Native uses the same command surface. The native OTA client and automatic native patching are intentionally guarded until the Mach RN client package is ready.
152
154
 
153
155
  ## Deep Links
@@ -217,7 +219,7 @@ mach agent uninstall
217
219
  | `--local` | Run build on local machine |
218
220
  | `--dry-run` | Generate build script without running it |
219
221
  | `--simulator` | iOS Simulator build (no signing needed) |
220
- | `--auto-version` | Force Android versionCode or iOS buildNumber lookup from the store |
222
+ | `--auto-version` | Force Mach-managed Android versionCode or iOS buildNumber assignment |
221
223
  | `--auto-submit` | Submit the successful build to App Store Connect or Google Play |
222
224
  | `--verbose` | Enable detailed build logging |
223
225
  | `--json-output` | Write build metadata (`buildId`, Dashboard URL, status) to a JSON file for CI/CD |
@@ -339,9 +341,9 @@ mach credentials:service --platform ios
339
341
 
340
342
  The Dashboard also supports this under **Credentials → Android → package id → Service credentials**. Uploading a Google Play service key under `*` is legacy behavior; store submission now expects the service credential to match the Android package being submitted.
341
343
 
342
- App Store Connect keys are used for iOS TestFlight submission and iOS buildNumber auto-increment. Mach stores the key id, issuer id, Apple Developer Team ID, and App Store Connect provider/team metadata so build and submit commands can run without Apple ID prompts.
344
+ App Store Connect keys are used for iOS TestFlight submission. Mach stores the key id, issuer id, Apple Developer Team ID, and App Store Connect provider/team metadata so submit commands can run without Apple ID prompts.
343
345
 
344
- Google Play service keys are only needed for store automation: Android submission and Play-backed versionCode resolution. They are not signing credentials. A dev package such as `com.example.app.dev` needs its own Google Play service key only if that exact package exists in Google Play and you explicitly ask Mach to query Play for it.
346
+ Google Play service keys are only needed for Android store submission. They are not signing credentials. A dev package such as `com.example.app.dev` needs its own Google Play service key only if that exact package exists in Google Play and you submit that package.
345
347
 
346
348
  ## Configuration
347
349
 
@@ -402,12 +404,12 @@ Create a `mach.config.json` in your project root:
402
404
 
403
405
  | Property | Description |
404
406
  | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
405
- | `ios.bundleIdentifier` | iOS bundle ID used for signing, App Store Connect lookup, and submit |
407
+ | `ios.bundleIdentifier` | iOS bundle ID used for signing, version counter scoping, and submit |
406
408
  | `ios.appleTeamId` | Optional global Apple Developer Team ID used for iOS signing. Profile-specific `submit.<profile>.ios.appleTeamId` overrides it |
407
- | `ios.ascAppId` | App Store Connect app id. Optional when Mach can find the app by bundle ID; recommended for reliable iOS buildNumber lookup |
408
- | `ios.buildNumber` | Set to `"auto"` to let Mach resolve the next iOS CFBundleVersion from App Store Connect and seed the server-side build counter |
409
- | `android.package` | Android package name used for signing, Google Play lookup, and submit |
410
- | `android.versionCode` | Set to `"auto"` to let store builds resolve the next versionCode via Google Play |
409
+ | `ios.ascAppId` | App Store Connect app id used for iOS submission |
410
+ | `ios.buildNumber` | Set to `"auto"` to let Mach assign the next iOS CFBundleVersion from its Dashboard counter |
411
+ | `android.package` | Android package name used for signing, version counter scoping, and submit |
412
+ | `android.versionCode` | Set to `"auto"` to let Mach assign the next Android versionCode from its Dashboard counter |
411
413
 
412
414
  ### Profile Properties
413
415
 
@@ -473,11 +475,11 @@ The keystore file and its passwords are stored encrypted in the Dashboard when m
473
475
 
474
476
  ## Automated Versioning
475
477
 
476
- Mach can automatically determine the next Android `versionCode` and iOS `buildNumber` from the store, then increment safely to prevent duplicate upload rejections.
478
+ Mach can automatically assign the next Android `versionCode` and iOS `buildNumber` from Dashboard counters, then increment atomically so concurrent builds do not receive the same native version.
477
479
 
478
- **Android setup:** Upload a Google Service Account JSON via `mach credentials` Service Credentials for the exact Android package being queried.
480
+ Counters are scoped by Android package name or iOS bundle identifier, so development, staging, and production apps can advance independently.
479
481
 
480
- **iOS setup:** Upload or create an App Store Connect API key with `mach credentials:service --platform ios`. Set `ios.ascAppId` in `mach.config.json` when possible so Mach can query the exact App Store Connect app.
482
+ For existing apps already uploaded to App Store Connect or Google Play, seed the selected Dashboard environment once with the latest uploaded value (`BUILD_NUMBER` for iOS or `ANDROID_VERSION_CODE` for Android). Mach will assign the next value and continue from its own counter after that.
481
483
 
482
484
  **Usage:**
483
485
 
@@ -493,9 +495,9 @@ Or in config:
493
495
  "ios": { "buildNumber": "auto" }
494
496
  ```
495
497
 
496
- When `android.versionCode` is set to `"auto"`, Mach performs the Google Play lookup automatically for Android `store` builds. For `internal` builds, Mach skips the Play lookup by default so development packages do not need Google Play service keys. Pass `--auto-version` on an internal build only when that package is registered in Google Play and should be queried.
498
+ When `android.versionCode` is set to `"auto"`, Mach assigns an Android versionCode automatically for store builds. For internal builds, pass `--auto-version` when you also want Mach to assign a versionCode.
497
499
 
498
- When `ios.buildNumber` is set to `"auto"`, Mach queries App Store Connect for the latest uploaded build number and seeds Mach's server-side counter from that value. If App Store Connect has build `81` and Mach's internal counter is still `1`, the next iOS build becomes at least `82`. Concurrent builds are still safe because the Dashboard API increments the counter atomically.
500
+ When `ios.buildNumber` is set to `"auto"`, Mach assigns the next iOS CFBundleVersion from the scoped Dashboard counter. Concurrent builds are safe because the Dashboard API increments the counter atomically.
499
501
 
500
502
  This only changes iOS `CFBundleVersion` / build number. It does not bump the public App Store version (`CFBundleShortVersionString`, usually `expo.version` in `app.json`). After a version like `1.17.0` is approved/released, Apple closes that train for new uploads; bump the app version, for example to `1.17.1`, rebuild, then submit.
501
503