@farris/cli 1.0.13 → 1.0.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/ci/cli.js +7 -5
- 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
|
|
@@ -207,12 +207,14 @@ function buildWorkspace(workspace) {
|
|
207
207
|
function tagMonoWorkspace(monoWorkspace, commitUrl) {
|
208
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
|
+
console.log(`git push --tags -o ci.skip ${commitUrl}`);
|
214
215
|
return childProcess.exec("git", ["push", '--tags', '-o', 'ci.skip', commitUrl]);
|
215
216
|
} else {
|
217
|
+
console.log(`git push --tags -o ci.skip`);
|
216
218
|
return childProcess.exec('git', ['push', '--tags', '-o', 'ci.skip']);
|
217
219
|
}
|
218
220
|
}
|
@@ -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
|
});
|