@fireota/cli 0.5.0 → 0.6.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.
- package/README.md +5 -1
- package/bin/fireota.mjs +15 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ fireota publish --app <appId> --platform <android|ios|all> [--runtime <x.y.z>]
|
|
|
70
70
|
fireota bundle --platform <android|ios> [--entry index.js] [--out update.fota] [--hermes auto|on|off]
|
|
71
71
|
fireota whoami
|
|
72
72
|
fireota signing generate [--out ./fireota-keys]
|
|
73
|
-
fireota release create --app <appId> --platform <p> --runtime <r> [--message m] [--version v] [--channel c]
|
|
73
|
+
fireota release create --app <appId> --platform <p> --runtime <r> [--bundle-url <url>] [--bundle-hash <sha256>] [--bundle-size <bytes>] [--message m] [--version v] [--channel c]
|
|
74
74
|
fireota release upload <releaseId> --file update.fota [--private-key key.pem]
|
|
75
75
|
fireota release publish <releaseId> [--rollout 100]
|
|
76
76
|
fireota release rollout <releaseId> --percentage <0-100>
|
|
@@ -112,6 +112,10 @@ script:
|
|
|
112
112
|
- npx fireota publish --app "$FIREOTA_APP_ID" --platform android --runtime 1.3.0 --message "$(git log -1 --pretty=%s)"
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
## Changelog
|
|
116
|
+
|
|
117
|
+
See the root [CHANGELOG.md](../../CHANGELOG.md) for version release notes and update history.
|
|
118
|
+
|
|
115
119
|
## License
|
|
116
120
|
|
|
117
121
|
MIT
|
package/bin/fireota.mjs
CHANGED
|
@@ -232,7 +232,16 @@ async function createRelease(flags, platform, extra = {}) {
|
|
|
232
232
|
...(flags.native ? { nativeVersionConstraint: String(flags.native) } : {}),
|
|
233
233
|
...(ci.gitCommitSha ? { gitCommitSha: ci.gitCommitSha.slice(0, 64) } : {}),
|
|
234
234
|
...(ci.gitBranch ? { gitBranch: ci.gitBranch.slice(0, 120) } : {}),
|
|
235
|
-
...(ci.buildNumber ? { buildNumber: String(ci.buildNumber).slice(0, 40) } : {}),
|
|
235
|
+
...(ci.buildNumber ? { buildNumber: String(ci.buildNumber).slice(0, 40) } : {}),
|
|
236
|
+
...(flags["bundle-url"]
|
|
237
|
+
? {
|
|
238
|
+
externalBundle: {
|
|
239
|
+
url: String(flags["bundle-url"]),
|
|
240
|
+
sha256: String(flags["bundle-hash"] || flags.hash || ""),
|
|
241
|
+
size: Number(flags["bundle-size"] || flags.size || 0),
|
|
242
|
+
},
|
|
243
|
+
}
|
|
244
|
+
: {}),
|
|
236
245
|
...extra,
|
|
237
246
|
};
|
|
238
247
|
// Same inputs -> same release, so a retried CI job never creates duplicates.
|
|
@@ -255,7 +264,7 @@ async function uploadRelease(releaseId, file, signing) {
|
|
|
255
264
|
}
|
|
256
265
|
log(`Uploading ${(bytes.length / 1024 / 1024).toFixed(2)} MB…`);
|
|
257
266
|
const result = await api("POST", `/releases/${releaseId}/bundle`, form, headers);
|
|
258
|
-
log(`Verified in your
|
|
267
|
+
log(`Verified in your cloud storage. SHA-256 ${result.checksum}`);
|
|
259
268
|
return result;
|
|
260
269
|
}
|
|
261
270
|
|
|
@@ -315,7 +324,7 @@ async function uploadExpoRelease(releaseId, exported, config) {
|
|
|
315
324
|
form.append("expoConfig", JSON.stringify(config));
|
|
316
325
|
log(`Uploading bundle + ${exported.assets.length} assets…`);
|
|
317
326
|
const result = await api("POST", `/releases/${releaseId}/bundle`, form, { "x-bundle-sha256": sha256(bytes) });
|
|
318
|
-
log(`Verified in your
|
|
327
|
+
log(`Verified in your cloud storage. SHA-256 ${result.checksum}`);
|
|
319
328
|
return result;
|
|
320
329
|
}
|
|
321
330
|
|
|
@@ -357,7 +366,9 @@ async function releaseAction(releaseId, body) {
|
|
|
357
366
|
/** Create → upload → publish, skipping steps a retried CI job already completed. */
|
|
358
367
|
async function publishOne(flags, platform, file, extra, privateKey) {
|
|
359
368
|
const release = await createRelease(flags, platform, extra);
|
|
360
|
-
if (["
|
|
369
|
+
if (flags["bundle-url"]) {
|
|
370
|
+
log(`Using external bundle URL: ${flags["bundle-url"]}`);
|
|
371
|
+
} else if (["draft", "failed", "uploading"].includes(release.status)) {
|
|
361
372
|
await uploadRelease(release.id, file, privateKey ? { key: privateKey, runtimeVersion: runtimeFor(flags, platform), platform } : null);
|
|
362
373
|
} else {
|
|
363
374
|
log(`Bundle already uploaded (status ${release.status}); skipping upload.`);
|