fix(core): fail nx release cli when publish step fails (#31088)
This commit is contained in:
parent
05c9d0d24f
commit
a944c8cd54
@ -364,7 +364,14 @@ export function createAPI(overrideReleaseConfig: NxReleaseConfiguration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shouldPublish) {
|
if (shouldPublish) {
|
||||||
await releasePublish(args);
|
const publishResults = await releasePublish(args);
|
||||||
|
const allExitOk = Object.values(publishResults).every(
|
||||||
|
(result) => result.code === 0
|
||||||
|
);
|
||||||
|
if (!allExitOk) {
|
||||||
|
// When a publish target fails, we want to fail the nx release CLI
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
output.logSingleLine('Skipped publishing packages.');
|
output.logSingleLine('Skipped publishing packages.');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user