Skip to content

Commit

Permalink
[eas-cli] use BuildMode.REPACK for --repack builds (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
szdziedzic authored May 28, 2024
1 parent 3ed5e78 commit f0e3b64
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/eas-cli/src/build/android/prepareJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ export async function prepareJobAsync(
? getCustomBuildConfigPathForJob(buildProfile.config)
: undefined;

let buildMode;
if (ctx.repack) {
buildMode = BuildMode.REPACK;
} else if (buildProfile.config) {
buildMode = BuildMode.CUSTOM;
} else {
buildMode = BuildMode.BUILD;
}

const job: Android.Job = {
type: ctx.workflow,
platform: Platform.ANDROID,
Expand Down Expand Up @@ -93,7 +102,7 @@ export async function prepareJobAsync(
experimental: {
prebuildCommand: buildProfile.prebuildCommand,
},
mode: buildProfile.config || ctx.repack ? BuildMode.CUSTOM : BuildMode.BUILD,
mode: buildMode,
triggeredBy: BuildTrigger.EAS_CLI,
...(maybeCustomBuildConfigPath && {
customBuildConfig: {
Expand Down
11 changes: 10 additions & 1 deletion packages/eas-cli/src/build/ios/prepareJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ export async function prepareJobAsync(
? getCustomBuildConfigPathForJob(buildProfile.config)
: undefined;

let buildMode;
if (ctx.repack) {
buildMode = BuildMode.REPACK;
} else if (buildProfile.config) {
buildMode = BuildMode.CUSTOM;
} else {
buildMode = BuildMode.BUILD;
}

const job: Ios.Job = {
type: ctx.workflow,
platform: Platform.IOS,
Expand Down Expand Up @@ -88,7 +97,7 @@ export async function prepareJobAsync(
experimental: {
prebuildCommand: buildProfile.prebuildCommand,
},
mode: buildProfile.config || ctx.repack ? BuildMode.CUSTOM : BuildMode.BUILD,
mode: buildMode,
triggeredBy: BuildTrigger.EAS_CLI,
...(maybeCustomBuildConfigPath && {
customBuildConfig: {
Expand Down

0 comments on commit f0e3b64

Please sign in to comment.