Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List failed packages as summary at end of unstable release #130

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions workspace/unstable-release/src/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ async function publish() {

/** @type {string[]} */
const errors = [];
/** @type {string[]} */
const erroredPackages = [];

for (let workspace of publicWorkspaces) {
// @ts-ignore
Expand Down Expand Up @@ -63,6 +65,7 @@ async function publish() {

if (isErr(err)) {
errors.push(err.stderr);
erroredPackages.push(name);
}
continue;
}
Expand All @@ -73,6 +76,14 @@ async function publish() {
if (errors.length) {
console.error("Errors were encountered while publishing these packages");
errors.forEach((error) => void console.log(error));

console.info(
'------------------------------------------\n'
+ ' Packages that failed to publish\n'
+ '------------------------------------------\n'
);

erroredPackages.forEach((error) => void console.log(error));
process.exit(1);
}
}
Expand Down
Loading