cli: fix for backend bundle build ignoring building of the app
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -13,3 +13,5 @@ The `backstage-cli migrate package-scripts` received several tweaks to make it m
|
||||
The `script` command category has been renamed to `package`.
|
||||
|
||||
The `backstage-cli package build` command set an incorrect target directory for `app` and `backend` packages, which has been fixed.
|
||||
|
||||
The `backend:bundle` and `repo build` command for the `backend` role was previously ignoring building of bundled packages that had migrated to use package roles and the standard build script, this has now been fixed.
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
Output,
|
||||
} from '../builder';
|
||||
import { copyPackageDist } from './copyPackageDist';
|
||||
import { getRoleInfo } from '../role';
|
||||
|
||||
// These packages aren't safe to pack in parallel since the CLI depends on them
|
||||
const UNSAFE_PACKAGES = [
|
||||
@@ -131,7 +132,9 @@ export async function createDistWorkspace(
|
||||
}
|
||||
const role = pkg.packageJson.backstage?.role;
|
||||
if (!role) {
|
||||
console.warn(`Ignored ${pkg.packageJson.name} because it has no role`);
|
||||
console.warn(
|
||||
`Building ${pkg.packageJson.name} separately because it has no role`,
|
||||
);
|
||||
customBuild.push(pkg.packageJson.name);
|
||||
continue;
|
||||
}
|
||||
@@ -144,7 +147,15 @@ export async function createDistWorkspace(
|
||||
|
||||
if (!buildScript.startsWith('backstage-cli package build')) {
|
||||
console.warn(
|
||||
`Ignored ${pkg.packageJson.name} because it has a custom build script, '${buildScript}'`,
|
||||
`Building ${pkg.packageJson.name} separately because it has a custom build script, '${buildScript}'`,
|
||||
);
|
||||
customBuild.push(pkg.packageJson.name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (getRoleInfo(role).output.includes('bundle')) {
|
||||
console.warn(
|
||||
`Building ${pkg.packageJson.name} separately because it is a bundled package`,
|
||||
);
|
||||
customBuild.push(pkg.packageJson.name);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user