@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.
- package/ci/cli.js +10 -8
- 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}
|
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('
|
211
|
-
childProcess.execSync('git', ['tag', tagVersion, '-m',
|
210
|
+
const tagVersion = `v${date.format('YYYYMMDDHHmmss')}`;
|
211
|
+
childProcess.execSync('git', ['tag', tagVersion, '-m', 'Publish npm packages']);
|
212
212
|
// 提交变更集
|
213
213
|
if (commitUrl) {
|
214
|
-
|
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
|
-
|
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(
|
274
|
-
monoWorkspace.changedProjects =
|
275
|
+
.then((checkResults) => {
|
276
|
+
monoWorkspace.changedProjects = checkResults.filter((projectInfo) => projectInfo.hasChanged);
|
275
277
|
return Promise.resolve(monoWorkspace);
|
276
278
|
});
|
277
279
|
});
|