rigjs 3.0.30 → 3.0.32

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/lib/tag/index.ts CHANGED
@@ -12,7 +12,15 @@ import json5 from 'json5';
12
12
 
13
13
  let red = chalk.red;
14
14
 
15
-
15
+ const exec = (cmd:string)=>{
16
+ shell.exec(`cmd`,(code, stdout, stderr)=>{
17
+ if (stderr){
18
+ print.error(stderr);
19
+ }else{
20
+ print.succeed(`success: ${cmd}`);
21
+ }
22
+ });
23
+ }
16
24
  const load = async () => {
17
25
  try {
18
26
  let pkgJson = JSON.parse(fs.readFileSync('package.json').toString());
@@ -45,7 +53,7 @@ const load = async () => {
45
53
  process.exit(1)
46
54
  }
47
55
  });
48
- shell.exec(`git tag ${tagStr}`);
56
+ exec(`git tag ${tagStr}`);
49
57
  print.succeed(`tag:${tagStr} created.`);
50
58
  }catch(e:any){
51
59
  print.error(`create tag failed:${e.message}`);
@@ -55,7 +63,7 @@ const load = async () => {
55
63
  let tagStr = `${pkgJson.rig_tag_template}`;
56
64
 
57
65
  try{
58
- const fields = pkgJson.tag_template.match(/(?<={)[^{}]+(?=})/g)
66
+ const fields = pkgJson.rig_tag_template.match(/(?<={)[^{}]+(?=})/g)
59
67
  fields.forEach((field: string) => {
60
68
  const value = pkgJson[field];
61
69
  if (value) {
@@ -65,15 +73,13 @@ const load = async () => {
65
73
  process.exit(1)
66
74
  }
67
75
  });
68
- shell.exec(`git tag ${tagStr}`);
69
- print.succeed(`tag:${tagStr} created.`);
76
+ exec(`git tag ${tagStr}`)
70
77
  }catch(e:any){
71
78
  print.error(`create tag failed:${e.message}`);
72
79
  process.exit(1)
73
80
  }
74
81
  }else{
75
- shell.exec(`git tag ${version}`);
76
- print.succeed(`tag:${version} created.`);
82
+ exec(`git tag ${version}`)
77
83
  }
78
84
  } else {
79
85
  print.error('please commit your changes before tag');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rigjs",
3
- "version": "3.0.30",
3
+ "version": "3.0.32",
4
4
  "description": "A multi-repos dev tool based on yarn and git.Rigjs is intended to be the simplest way to develop,share and deliver codes between different developers or different projects.",
5
5
  "keywords": [
6
6
  "modular",