pubz 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +32 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1400,8 +1400,10 @@ async function main() {
|
|
|
1400
1400
|
console.log("");
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1403
|
+
if (!options.skipPublish) {
|
|
1404
|
+
console.log("✅ " + green(bold(`Published v${newVersion}!`)));
|
|
1405
|
+
console.log("");
|
|
1406
|
+
}
|
|
1405
1407
|
const changelog = await generateChangelog(cwd);
|
|
1406
1408
|
if (changelog.terminal) {
|
|
1407
1409
|
frameHeader("\uD83D\uDCCB Changelog");
|
|
@@ -1438,6 +1440,7 @@ async function main() {
|
|
|
1438
1440
|
}
|
|
1439
1441
|
}
|
|
1440
1442
|
}
|
|
1443
|
+
const errors = [];
|
|
1441
1444
|
if (!options.dryRun) {
|
|
1442
1445
|
let shouldTag;
|
|
1443
1446
|
let shouldPush = false;
|
|
@@ -1464,27 +1467,44 @@ async function main() {
|
|
|
1464
1467
|
if (tagResult.success) {
|
|
1465
1468
|
if (shouldPush) {
|
|
1466
1469
|
frameLine(dim("Pushing tag to origin..."));
|
|
1467
|
-
await pushGitTag(newVersion, cwd, options.dryRun);
|
|
1468
|
-
if (
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1470
|
+
const pushResult = await pushGitTag(newVersion, cwd, options.dryRun);
|
|
1471
|
+
if (pushResult.success) {
|
|
1472
|
+
if (releaseNotes && shouldRelease) {
|
|
1473
|
+
frameLine(dim("Creating GitHub release..."));
|
|
1474
|
+
const releaseResult = await createGitHubRelease(newVersion, releaseNotes, cwd, options.dryRun);
|
|
1475
|
+
if (releaseResult.success && releaseResult.url) {
|
|
1476
|
+
frameLine(` Release: ${cyan(releaseResult.url)}`);
|
|
1477
|
+
} else if (!releaseResult.success) {
|
|
1478
|
+
const msg = releaseResult.error ?? "Failed to create GitHub release";
|
|
1479
|
+
frameLine(red(msg));
|
|
1480
|
+
errors.push(msg);
|
|
1481
|
+
}
|
|
1475
1482
|
}
|
|
1483
|
+
} else {
|
|
1484
|
+
const msg = pushResult.error ?? "Failed to push tag to origin";
|
|
1485
|
+
frameLine(red(msg));
|
|
1486
|
+
errors.push(msg);
|
|
1476
1487
|
}
|
|
1477
1488
|
} else {
|
|
1478
1489
|
frameLine(`Push manually: ${dim(`git push origin v${newVersion}`)}`);
|
|
1479
1490
|
}
|
|
1480
1491
|
} else {
|
|
1481
|
-
|
|
1492
|
+
const msg = tagResult.error ?? "Failed to create git tag";
|
|
1493
|
+
frameLine(red(msg));
|
|
1494
|
+
errors.push(msg);
|
|
1482
1495
|
}
|
|
1483
1496
|
frameFooter();
|
|
1484
1497
|
console.log("");
|
|
1485
1498
|
}
|
|
1486
1499
|
}
|
|
1487
|
-
|
|
1500
|
+
if (errors.length > 0) {
|
|
1501
|
+
console.log("⚠️ " + yellow(bold("Done with errors:")));
|
|
1502
|
+
for (const err of errors) {
|
|
1503
|
+
console.log(` ${red("•")} ${err}`);
|
|
1504
|
+
}
|
|
1505
|
+
} else {
|
|
1506
|
+
console.log("\uD83C\uDF89 " + green(bold("Done!")));
|
|
1507
|
+
}
|
|
1488
1508
|
closePrompt();
|
|
1489
1509
|
}
|
|
1490
1510
|
main().catch((error) => {
|