@deot/dev-releaser 1.1.1 → 1.1.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/index.cjs.js +17 -8
- package/dist/index.es.js +17 -8
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -441,9 +441,6 @@ class Release {
|
|
|
441
441
|
cwd: packageDir
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
async clean() {
|
|
445
|
-
await this.cleanTagsAndKeepLastTag();
|
|
446
|
-
}
|
|
447
444
|
async cleanTagsAndKeepLastTag() {
|
|
448
445
|
const { commandOptions } = this;
|
|
449
446
|
if (!commandOptions.keepLastTag)
|
|
@@ -561,29 +558,40 @@ const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
|
561
558
|
devShared.Logger.log(chalk.yellow('Git Fetch...'));
|
|
562
559
|
await devShared.Shell.spawn('git', ['fetch', '--prune', '--prune-tags']);
|
|
563
560
|
}
|
|
561
|
+
devShared.Logger.log(chalk.blue(`\n---------------------\n`));
|
|
564
562
|
await inputs
|
|
565
563
|
.reduce((preProcess, packageFolderName) => {
|
|
566
564
|
const instance = instances[packageFolderName];
|
|
567
565
|
preProcess = preProcess
|
|
568
566
|
.then(() => instance.publish())
|
|
569
|
-
.then(() => instance.tag())
|
|
570
|
-
.then(() => instance.clean());
|
|
567
|
+
.then(() => instance.tag());
|
|
571
568
|
return preProcess;
|
|
572
569
|
}, Promise.resolve());
|
|
573
570
|
devShared.Logger.log(chalk.blue(`\n---------------------\n`));
|
|
574
571
|
if (!isChanged) {
|
|
575
|
-
devShared.Logger.log(chalk.magenta(`
|
|
572
|
+
devShared.Logger.log(chalk.magenta(`PUSH: `) + 'Nothing Chanaged.');
|
|
576
573
|
}
|
|
577
574
|
else if (!options.push) {
|
|
578
|
-
devShared.Logger.log(chalk.magenta(`
|
|
575
|
+
devShared.Logger.log(chalk.magenta(`PUSH: `) + 'Push Disabled.');
|
|
579
576
|
}
|
|
580
577
|
else if (options.dryRun) {
|
|
581
|
-
devShared.Logger.log(chalk.magenta(`
|
|
578
|
+
devShared.Logger.log(chalk.magenta(`PUSH: `) + 'Skipping Git Push');
|
|
582
579
|
}
|
|
583
580
|
else {
|
|
581
|
+
devShared.Logger.log(chalk.yellow('Git Pull/Push...'));
|
|
582
|
+
await devShared.Shell.spawn('git', ['pull', '--rebase']);
|
|
584
583
|
await devShared.Shell.spawn('git', ['push']);
|
|
585
584
|
await devShared.Shell.spawn('git', ['push', '--tags']);
|
|
586
585
|
}
|
|
586
|
+
devShared.Logger.log(chalk.blue(`\n---------------------\n`));
|
|
587
|
+
await inputs
|
|
588
|
+
.reduce((preProcess, packageFolderName) => {
|
|
589
|
+
const instance = instances[packageFolderName];
|
|
590
|
+
preProcess = preProcess
|
|
591
|
+
.then(() => instance.cleanTagsAndKeepLastTag());
|
|
592
|
+
return preProcess;
|
|
593
|
+
}, Promise.resolve());
|
|
594
|
+
devShared.Logger.log(chalk.magenta(`FINISH: `) + chalk.green(`Release Successed.`));
|
|
587
595
|
if (options.dryRun) {
|
|
588
596
|
devShared.Logger.log(chalk.green('NO DRY RUN WAY: ')
|
|
589
597
|
+ chalk.grey(`npm run release -- --no-dry-run\n`));
|
|
@@ -596,6 +604,7 @@ const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
|
596
604
|
else {
|
|
597
605
|
devShared.Logger.error(e);
|
|
598
606
|
}
|
|
607
|
+
devShared.Logger.log(chalk.magenta(`FINISH: `) + chalk.red(`Release Failed.`));
|
|
599
608
|
process.exit(1);
|
|
600
609
|
}
|
|
601
610
|
});
|
package/dist/index.es.js
CHANGED
|
@@ -420,9 +420,6 @@ class Release {
|
|
|
420
420
|
cwd: packageDir
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
async clean() {
|
|
424
|
-
await this.cleanTagsAndKeepLastTag();
|
|
425
|
-
}
|
|
426
423
|
async cleanTagsAndKeepLastTag() {
|
|
427
424
|
const { commandOptions } = this;
|
|
428
425
|
if (!commandOptions.keepLastTag)
|
|
@@ -540,29 +537,40 @@ const run = (options) => Utils.autoCatch(async () => {
|
|
|
540
537
|
Logger.log(chalk.yellow('Git Fetch...'));
|
|
541
538
|
await Shell.spawn('git', ['fetch', '--prune', '--prune-tags']);
|
|
542
539
|
}
|
|
540
|
+
Logger.log(chalk.blue(`\n---------------------\n`));
|
|
543
541
|
await inputs
|
|
544
542
|
.reduce((preProcess, packageFolderName) => {
|
|
545
543
|
const instance = instances[packageFolderName];
|
|
546
544
|
preProcess = preProcess
|
|
547
545
|
.then(() => instance.publish())
|
|
548
|
-
.then(() => instance.tag())
|
|
549
|
-
.then(() => instance.clean());
|
|
546
|
+
.then(() => instance.tag());
|
|
550
547
|
return preProcess;
|
|
551
548
|
}, Promise.resolve());
|
|
552
549
|
Logger.log(chalk.blue(`\n---------------------\n`));
|
|
553
550
|
if (!isChanged) {
|
|
554
|
-
Logger.log(chalk.magenta(`
|
|
551
|
+
Logger.log(chalk.magenta(`PUSH: `) + 'Nothing Chanaged.');
|
|
555
552
|
}
|
|
556
553
|
else if (!options.push) {
|
|
557
|
-
Logger.log(chalk.magenta(`
|
|
554
|
+
Logger.log(chalk.magenta(`PUSH: `) + 'Push Disabled.');
|
|
558
555
|
}
|
|
559
556
|
else if (options.dryRun) {
|
|
560
|
-
Logger.log(chalk.magenta(`
|
|
557
|
+
Logger.log(chalk.magenta(`PUSH: `) + 'Skipping Git Push');
|
|
561
558
|
}
|
|
562
559
|
else {
|
|
560
|
+
Logger.log(chalk.yellow('Git Pull/Push...'));
|
|
561
|
+
await Shell.spawn('git', ['pull', '--rebase']);
|
|
563
562
|
await Shell.spawn('git', ['push']);
|
|
564
563
|
await Shell.spawn('git', ['push', '--tags']);
|
|
565
564
|
}
|
|
565
|
+
Logger.log(chalk.blue(`\n---------------------\n`));
|
|
566
|
+
await inputs
|
|
567
|
+
.reduce((preProcess, packageFolderName) => {
|
|
568
|
+
const instance = instances[packageFolderName];
|
|
569
|
+
preProcess = preProcess
|
|
570
|
+
.then(() => instance.cleanTagsAndKeepLastTag());
|
|
571
|
+
return preProcess;
|
|
572
|
+
}, Promise.resolve());
|
|
573
|
+
Logger.log(chalk.magenta(`FINISH: `) + chalk.green(`Release Successed.`));
|
|
566
574
|
if (options.dryRun) {
|
|
567
575
|
Logger.log(chalk.green('NO DRY RUN WAY: ')
|
|
568
576
|
+ chalk.grey(`npm run release -- --no-dry-run\n`));
|
|
@@ -575,6 +583,7 @@ const run = (options) => Utils.autoCatch(async () => {
|
|
|
575
583
|
else {
|
|
576
584
|
Logger.error(e);
|
|
577
585
|
}
|
|
586
|
+
Logger.log(chalk.magenta(`FINISH: `) + chalk.red(`Release Failed.`));
|
|
578
587
|
process.exit(1);
|
|
579
588
|
}
|
|
580
589
|
});
|