Skip to content

Commit

Permalink
Move repack steps into code
Browse files Browse the repository at this point in the history
  • Loading branch information
sjchmiela committed Jan 16, 2025
1 parent 5cce0b4 commit 4bf33b5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 35 deletions.
18 changes: 0 additions & 18 deletions packages/build-tools/resources/__eas/repack.yml

This file was deleted.

20 changes: 17 additions & 3 deletions packages/build-tools/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,23 @@ export class BuildContext<TJob extends Job = Job> {
...job,
...(shouldApplyRepackOverrides
? {
customBuildConfig: {
path: '__eas/repack.yml',
},
steps: [
{ uses: 'eas/checkout' },
{ uses: 'eas/install_node_modules' },
{ uses: 'eas/resolve_build_config' },
{
uses: 'eas/__download_and_repack_golden_development_client_archive',
id: 'download_and_repack_golden_development_client_archive',
},
{
uses: 'eas/upload_artifact',
name: 'Upload build artifact',
inputs: {
type: 'application-archive',
path: '${{ steps.download_and_repack_golden_development_client_archive.outputs.repacked_archive_path }}',
},
},
],
}
: null),
};
Expand Down
14 changes: 0 additions & 14 deletions packages/build-tools/src/generic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export async function runGenericJobAsync(

await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);

await addEasWorkflows(customBuildCtx);

const globalContext = new BuildStepGlobalContext(customBuildCtx, false);

const parser = new StepsConfigParser(globalContext, {
Expand Down Expand Up @@ -56,15 +54,3 @@ export async function runGenericJobAsync(

return { runResult, buildWorkflow: workflow };
}

export async function addEasWorkflows(customBuildCtx: CustomBuildContext): Promise<void> {
await fs.promises.mkdir(path.join(customBuildCtx.projectSourceDirectory, '__eas'), {
recursive: true,
});

await fs.promises.cp(
path.join(__dirname, '..', 'resources', '__eas'),
path.join(customBuildCtx.projectSourceDirectory, '__eas'),
{ recursive: true }
);
}

0 comments on commit 4bf33b5

Please sign in to comment.