Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build-tools] Do not add repack.yml to project directory #496

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions packages/build-tools/resources/__eas/repack.yml

This file was deleted.

2 changes: 0 additions & 2 deletions packages/build-tools/src/builders/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ import { CustomBuildContext } from '../customBuildContext';
import { resolveEnvFromBuildProfileAsync } from '../common/easBuildInternal';
import { getEasFunctionGroups } from '../steps/easFunctionGroups';
import { findAndUploadXcodeBuildLogsAsync } from '../ios/xcodeBuildLogs';
import { addEasWorkflows } from '../generic';

export async function runCustomBuildAsync(ctx: BuildContext<BuildJob>): Promise<Artifacts> {
const customBuildCtx = new CustomBuildContext(ctx);
await addEasWorkflows(customBuildCtx);
await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);
if (ctx.job.triggeredBy === BuildTrigger.GIT_BASED_INTEGRATION) {
// We need to setup envs from eas.json
Expand Down
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',
with: {
type: 'application-archive',
path: '${ steps.download_and_repack_golden_development_client_archive.repacked_archive_path }',
},
},
],
}
: null),
};
Expand Down
17 changes: 0 additions & 17 deletions packages/build-tools/src/generic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import fs from 'fs';
import path from 'path';

import { BuildPhase, Generic } from '@expo/eas-build-job';
import { BuildStepGlobalContext, BuildWorkflow, errors, StepsConfigParser } from '@expo/steps';
import { Result, asyncResult } from '@expo/results';
Expand All @@ -20,8 +17,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 +51,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 }
);
}
Loading