@@ -11,7 +11,6 @@ import { PublishCommandOptions } from "./types.js";
1111import { publish } from "../../tasks/publish/index.js" ;
1212import { parseReleaseType } from "./parseReleaseType.js" ;
1313import { getPackagesToBuildProps } from "../build/variants.js" ;
14- import { normalizeArchitecture } from "../build/handler.js" ;
1514
1615/**
1716 * Common handler for CLI and programatic usage
@@ -29,7 +28,6 @@ export async function publishHandler({
2928 require_git_data : requireGitData ,
3029 delete_old_pins : deleteOldPins ,
3130 skip_compose_validation : skipComposeValidation ,
32- arch,
3331 // Global options
3432 dir = defaultDir ,
3533 compose_file_name : composeFileName = defaultComposeFileName ,
@@ -66,29 +64,8 @@ export async function publishHandler({
6664
6765 const variantsDirPath = path . join ( dir , variantsDirName ) ;
6866
69- const architecture = arch ? normalizeArchitecture ( arch ) : undefined ;
70-
7167 const isMultiVariant = ! ! allVariants || ! ! variants ;
7268
73- const packagesToBuildProps = getPackagesToBuildProps ( {
74- allVariants : Boolean ( allVariants ) ,
75- commaSeparatedVariants : variants ,
76- rootDir : dir ,
77- variantsDirPath,
78- composeFileName
79- } ) ;
80-
81- // Filter architectures if --arch flag is provided
82- if ( architecture ) {
83- for ( const pkg of packagesToBuildProps ) {
84- if ( ! pkg . architectures . includes ( architecture ) )
85- throw Error (
86- `Architecture '${ architecture } ' is not supported by package ${ pkg . manifest . name } . Supported: ${ pkg . architectures . join ( ", " ) } `
87- ) ;
88- pkg . architectures = [ architecture ] ;
89- }
90- }
91-
9269 const publishTasks = new Listr (
9370 publish ( {
9471 releaseType,
@@ -105,7 +82,13 @@ export async function publishHandler({
10582 verbosityOptions,
10683 variantsDirPath,
10784 skipComposeValidation,
108- packagesToBuildProps,
85+ packagesToBuildProps : getPackagesToBuildProps ( {
86+ allVariants : Boolean ( allVariants ) ,
87+ commaSeparatedVariants : variants ,
88+ rootDir : dir ,
89+ variantsDirPath,
90+ composeFileName
91+ } ) ,
10992 isMultiVariant
11093 } ) ,
11194 verbosityOptions
0 commit comments