@farris/cli 1.0.11 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/ci/cli.js +10 -8
  2. package/package.json +1 -1
package/ci/cli.js CHANGED
@@ -183,7 +183,7 @@ function commitChanges(updatedVersions, commitUrl) {
183
183
  // 向git缓冲区中添加变更
184
184
  childProcess.execSync('git', ['add', '.']);
185
185
  // // 提交变更记录
186
- childProcess.execSync('git', ['commit', '-m', `${commitMessage} [skip ci]`]);
186
+ childProcess.execSync('git', ['commit', '-m', `${commitMessage}`]);
187
187
 
188
188
  console.log(commitMessage);
189
189
 
@@ -205,15 +205,17 @@ function buildWorkspace(workspace) {
205
205
  }
206
206
 
207
207
  function tagMonoWorkspace(monoWorkspace, commitUrl) {
208
- const tagMessage = builderVersionChangeMessage('Publish npm packages ', monoWorkspace.updateResult, '.');
208
+ // const tagMessage = builderVersionChangeMessage('Publish npm packages ', monoWorkspace.updateResult, '.');
209
209
  const date = moment(new Date());
210
- const tagVersion = `v${date.format('yyyyMMddhhmmss')}`;
211
- childProcess.execSync('git', ['tag', tagVersion, '-m', tagMessage]);
210
+ const tagVersion = `v${date.format('YYYYMMDDHHmmss')}`;
211
+ childProcess.execSync('git', ['tag', tagVersion, '-m', 'Publish npm packages']);
212
212
  // 提交变更集
213
213
  if (commitUrl) {
214
- return childProcess.exec("git", ["push", '-o', 'ci.skip', commitUrl]);
214
+ console.log(`git push --tags -o ci.skip ${commitUrl}`);
215
+ return childProcess.exec("git", ["push", '--tags', '-o', 'ci.skip', commitUrl]);
215
216
  } else {
216
- return childProcess.exec('git', ['push', '-o', 'ci.skip']);
217
+ console.log(`git push --tags -o ci.skip`);
218
+ return childProcess.exec('git', ['push', '--tags', '-o', 'ci.skip']);
217
219
  }
218
220
  }
219
221
 
@@ -270,8 +272,8 @@ function publishAll(commitUrl) {
270
272
  return changedPromise;
271
273
  });
272
274
  return Promise.all(checkProjects)
273
- .then(changedProjects => {
274
- monoWorkspace.changedProjects = changedProjects;
275
+ .then((checkResults) => {
276
+ monoWorkspace.changedProjects = checkResults.filter((projectInfo) => projectInfo.hasChanged);
275
277
  return Promise.resolve(monoWorkspace);
276
278
  });
277
279
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farris/cli",
3
- "version": "1.0.11",
3
+ "version": "1.0.15",
4
4
  "description": "Farris command line interface",
5
5
  "main": "index.js",
6
6
  "scripts": {