Merge pull request #14500 from backstage/repo-build-pass-config
cli: allow passing --config option to repo build command
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Allow passing `--config` option to `repo build` command
|
||||
@@ -400,6 +400,7 @@ Commands:
|
||||
Usage: backstage-cli repo build [options]
|
||||
|
||||
Options:
|
||||
--config <path>
|
||||
--all
|
||||
--since <ref>
|
||||
-h, --help
|
||||
|
||||
@@ -35,6 +35,7 @@ export function registerRepoCommand(program: Command) {
|
||||
.description(
|
||||
'Build packages in the project, excluding bundled app and backend packages.',
|
||||
)
|
||||
.option(...configOption)
|
||||
.option(
|
||||
'--all',
|
||||
'Build all packages, including bundled app and backend packages.',
|
||||
|
||||
@@ -152,9 +152,14 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const configPaths = opts.config?.length
|
||||
? opts.config
|
||||
: buildOptions.config ?? [];
|
||||
|
||||
await buildFrontend({
|
||||
targetDir: pkg.dir,
|
||||
configPaths: (buildOptions.config as string[]) ?? [],
|
||||
configPaths,
|
||||
writeStats: Boolean(buildOptions.stats),
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user