mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
fix(ota): use explicit Expo runtime version
This commit is contained in:
1 parent
02aa6e4a75
commit
267f3c3cf9
6 files changed
+97
-27
No files matched your search
@@ -78,12 +78,10 @@ if (process.env.RELEASE_CHANNEL) {
|
||||
|
||||
module.exports = () => ({
|
||||
...appJson.expo,
|
||||
// Updates are gated on the app version. A JavaScript-only change ships over
|
||||
// the air; anything that changes native code must ship a new store build with
|
||||
// a bumped `version`, which starts a fresh runtime version on the server.
|
||||
runtimeVersion: {
|
||||
policy: 'appVersion',
|
||||
},
|
||||
// Keep this explicit because EOAS validates a primitive runtime string before
|
||||
// upload. The release version script updates it atomically with app.json and
|
||||
// the checked-in native runtime values.
|
||||
runtimeVersion: '1.0.7',
|
||||
updates: {
|
||||
enabled: true,
|
||||
url: OTA_MANIFEST_URL,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
const configPath = require.resolve("../../app.config");
|
||||
const appJson = require("../../app.json");
|
||||
|
||||
type UpdateConfig = {
|
||||
version: string;
|
||||
runtimeVersion: string;
|
||||
updates: {
|
||||
codeSigningCertificate?: string;
|
||||
codeSigningMetadata?: Record<string, string>;
|
||||
@@ -43,4 +46,11 @@ describe("Expo OTA configuration", () => {
|
||||
expect(config.updates.codeSigningCertificate).toBeUndefined();
|
||||
expect(config.updates.codeSigningMetadata).toBeUndefined();
|
||||
});
|
||||
|
||||
it("resolves an explicit runtime version matching the public version", () => {
|
||||
const config = resolveConfig({ RELEASE_CHANNEL: "production" });
|
||||
|
||||
expect(config.runtimeVersion).toBe(appJson.expo.version);
|
||||
expect(config.runtimeVersion).toBe(config.version);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user