Skip to content

Commit

Permalink
[build-tools] resolve correct projectRootDirectory during eas build:i…
Browse files Browse the repository at this point in the history
…nternal (#495)
  • Loading branch information
szdziedzic authored Jan 16, 2025
1 parent 7390cf7 commit 3f0413f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/build-tools/src/common/easBuildInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ export async function runEasBuildInternalAsync<TJob extends BuildJob>({
logger,
env,
cwd,
projectRootOverride,
}: {
job: TJob;
logger: bunyan;
env: BuildStepEnv;
cwd: string;
projectRootOverride?: string;
}): Promise<{
newJob: TJob;
newMetadata: Metadata;
Expand Down Expand Up @@ -64,6 +66,7 @@ export async function runEasBuildInternalAsync<TJob extends BuildJob>({
EXPO_TOKEN: nullthrows(job.secrets, 'Secrets must be defined for non-custom builds')
.robotAccessToken,
...extraEnv,
EAS_PROJECT_ROOT: projectRootOverride,
},
logger,
mode: PipeMode.STDERR_ONLY_AS_STDOUT,
Expand Down
1 change: 1 addition & 0 deletions packages/build-tools/src/common/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export async function setupAsync<TJob extends BuildJob>(ctx: BuildContext<TJob>)
env: ctx.env,
logger: ctx.logger,
cwd: ctx.getReactNativeProjectDirectory(),
projectRootOverride: ctx.env.EAS_NO_VCS ? ctx.buildDirectory : undefined,
});
ctx.updateJobInformation(newJob, newMetadata);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export async function resolveBuildConfigAsync({
env,
logger,
cwd: workingDirectory,
projectRootOverride: env.EAS_NO_VCS ? ctx.projectTargetDirectory : undefined,
});
ctx.updateJobInformation(newJob, newMetadata);
}
Expand Down

0 comments on commit 3f0413f

Please sign in to comment.