zen-gitsync 2.7.14 → 2.7.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-gitsync",
3
- "version": "2.7.14",
3
+ "version": "2.7.15",
4
4
  "description": "一个 git 提交的工具",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -431,13 +431,13 @@ async function commitChanges(version) {
431
431
  execSync(`git tag v${version}`, { stdio: 'inherit' });
432
432
  console.log(chalk.green(`已创建标签: v${version}`));
433
433
 
434
- // 询问是否推送到远程
435
- const rl = createReadlineInterface();
434
+ // 默认推送到远程(注释掉确认提示)
435
+ // const rl = createReadlineInterface();
436
436
 
437
437
  try {
438
- const answer = await rl.question(chalk.yellow('是否推送代码和标签到远程仓库? (Y/n): '));
438
+ // const answer = await rl.question(chalk.yellow('是否推送代码和标签到远程仓库? (Y/n): '));
439
439
 
440
- if (answer.toLowerCase() !== 'n') {
440
+ // if (answer.toLowerCase() !== 'n') {
441
441
  try {
442
442
  // 获取当前分支
443
443
  const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
@@ -453,11 +453,11 @@ async function commitChanges(version) {
453
453
  console.error(chalk.red('推送到远程仓库失败:'), pushError);
454
454
  // 继续发布过程,不终止
455
455
  }
456
- } else {
457
- console.log(chalk.yellow('跳过推送到远程仓库'));
458
- }
456
+ // } else {
457
+ // console.log(chalk.yellow('跳过推送到远程仓库'));
458
+ // }
459
459
  } finally {
460
- rl.close();
460
+ // rl.close();
461
461
 
462
462
  // 恢复Git钩子
463
463
  if (renamedHooks.length > 0) {
@@ -482,17 +482,17 @@ async function commitChanges(version) {
482
482
  async function publishToNpm() {
483
483
  console.log(chalk.blue('\n=== 发布到NPM ==='));
484
484
 
485
- // 创建readline接口
486
- const rl = createReadlineInterface();
485
+ // 默认发布到NPM(注释掉确认提示)
486
+ // const rl = createReadlineInterface();
487
487
 
488
488
  try {
489
489
  // 等待用户确认
490
- const answer = await rl.question(chalk.yellow('是否发布到NPM? (Y/n): '));
490
+ // const answer = await rl.question(chalk.yellow('是否发布到NPM? (Y/n): '));
491
491
 
492
- if (answer.toLowerCase() === 'n') {
493
- console.log(chalk.yellow('跳过发布到NPM'));
494
- return;
495
- }
492
+ // if (answer.toLowerCase() === 'n') {
493
+ // console.log(chalk.yellow('跳过发布到NPM'));
494
+ // return;
495
+ // }
496
496
 
497
497
  // 执行npm发布
498
498
  console.log(chalk.gray('执行npm发布...'));
@@ -524,7 +524,7 @@ async function publishToNpm() {
524
524
  throw error;
525
525
  }
526
526
  } finally {
527
- rl.close();
527
+ // rl.close();
528
528
  }
529
529
  }
530
530