Skip to content

Commit 28f3a92

Browse files
authored
[eas-cli] pass server env when resolving fingerprint runtime version (#2867)
# Why receiving an issue for a customer who uses eas environment and continuous-deploy-fingerprint github action. they have build variants setup in their app.config.ts. the app id, scheme and some other properties are determined by their `APP_VARIANT` variable. the `APP_VARIANT` is from eas server environment. when continuous-deploy-fingerprint first calculates fingerprint, it uses `eas env:exec` for the `npx expo-updates fingerprint:generate` call. the `APP_VARIANT` is correctly passed. then for `eas update` call, it doesn't pass the `APP_VARIANT` env and generates an inconsistent fingerprint. # How pass server env to the `getRuntimeVersionInfoObjectsAsync()` (`npx expo-updates runtimeversion:resolve`)
1 parent be9fb59 commit 28f3a92

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.
1010

1111
### 🐛 Bug fixes
1212

13+
- Fixed EAS server environment variables does not pass to `npx expo-updates runtimeversion:resolve` call. ([#2867](https://github.com/expo/eas-cli/pull/2867) by [@kudo](https://github.com/kudo))
14+
1315
### 🧹 Chores
1416

1517
## [15.0.2](https://github.com/expo/eas-cli/releases/tag/v15.0.2) - 2025-02-04

packages/eas-cli/src/commands/update/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ export default class UpdatePublish extends EasCommand {
237237
jsonFlag,
238238
});
239239

240+
const maybeServerEnv = environment
241+
? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' }
242+
: {};
243+
240244
// build bundle and upload assets for a new publish
241245
if (!skipBundler) {
242246
const bundleSpinner = ora().start('Exporting...');
@@ -247,11 +251,7 @@ export default class UpdatePublish extends EasCommand {
247251
exp,
248252
platformFlag: requestedPlatform,
249253
clearCache,
250-
extraEnv: {
251-
...(environment
252-
? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' }
253-
: {}),
254-
},
254+
extraEnv: maybeServerEnv,
255255
});
256256
bundleSpinner.succeed('Exported bundle(s)');
257257
} catch (e) {
@@ -393,7 +393,7 @@ export default class UpdatePublish extends EasCommand {
393393
...workflows,
394394
web: Workflow.UNKNOWN,
395395
},
396-
env: undefined,
396+
env: maybeServerEnv,
397397
});
398398
const runtimeToPlatformsAndFingerprintInfoMapping =
399399
getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects(

0 commit comments

Comments
 (0)