Skip to content

Commit

Permalink
Revert "[build-tools] Update expo-updates runtime version resolution (#…
Browse files Browse the repository at this point in the history
…354)"

This reverts commit 034fd75.
  • Loading branch information
wschurman authored Mar 6, 2024
1 parent 608c1ae commit 299fdcb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 96 deletions.
12 changes: 3 additions & 9 deletions packages/build-tools/src/steps/utils/expoUpdates.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Job, Platform } from '@expo/eas-build-job';
import { bunyan } from '@expo/logger';
import { ExpoConfig } from '@expo/config';

import { resolveRuntimeVersionAsync } from '../../utils/resolveRuntimeVersionAsync';
import { getRuntimeVersionNullableAsync } from '@expo/config-plugins/build/utils/Updates';

import {
iosGetNativelyDefinedChannelAsync,
Expand Down Expand Up @@ -32,14 +31,9 @@ export async function configureEASUpdateAsync({
appConfig: ExpoConfig;
}): Promise<void> {
const runtimeVersion =
inputs.runtimeVersion ??
inputs.channel ??
job.version?.runtimeVersion ??
(await resolveRuntimeVersionAsync({
projectDir: workingDirectory,
exp: appConfig,
platform: job.platform,
logger,
}));
(await getRuntimeVersionNullableAsync(workingDirectory, appConfig, job.platform));

const jobOrInputChannel = inputs.channel ?? job.updates?.channel;

Expand Down
13 changes: 6 additions & 7 deletions packages/build-tools/src/utils/expoUpdates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import assert from 'assert';

import { Platform, Job } from '@expo/eas-build-job';
import { getRuntimeVersionNullableAsync } from '@expo/config-plugins/build/utils/Updates';
import semver from 'semver';

import {
Expand All @@ -22,7 +23,6 @@ import {
import { BuildContext } from '../context';

import getExpoUpdatesPackageVersionIfInstalledAsync from './getExpoUpdatesPackageVersionIfInstalledAsync';
import { resolveRuntimeVersionAsync } from './resolveRuntimeVersionAsync';

export async function setRuntimeVersionNativelyAsync(
ctx: BuildContext<Job>,
Expand Down Expand Up @@ -148,12 +148,11 @@ export async function configureExpoUpdatesIfInstalledAsync(ctx: BuildContext<Job

const appConfigRuntimeVersion =
ctx.job.version?.runtimeVersion ??
(await resolveRuntimeVersionAsync({
projectDir: ctx.getReactNativeProjectDirectory(),
exp: ctx.appConfig,
platform: ctx.job.platform,
logger: ctx.logger,
}));
(await getRuntimeVersionNullableAsync(
ctx.getReactNativeProjectDirectory(),
ctx.appConfig,
ctx.job.platform
));
if (ctx.metadata?.runtimeVersion && ctx.metadata?.runtimeVersion !== appConfigRuntimeVersion) {
ctx.markBuildPhaseHasWarnings();
ctx.logger.warn(
Expand Down
34 changes: 0 additions & 34 deletions packages/build-tools/src/utils/expoUpdatesCli.ts

This file was deleted.

46 changes: 0 additions & 46 deletions packages/build-tools/src/utils/resolveRuntimeVersionAsync.ts

This file was deleted.

0 comments on commit 299fdcb

Please sign in to comment.