@farris/cli 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/ci/cli.js +8 -21
- package/package.json +1 -1
package/ci/cli.js
CHANGED
@@ -161,23 +161,10 @@ function builderVersionChangeMessage(prefix, updatedVersions, suffix = '') {
|
|
161
161
|
return latestMessage = latestMessage + message;
|
162
162
|
}, `${prefix} `)
|
163
163
|
return `${versionMessage} ${suffix}`;
|
164
|
-
// const versionMessage = updatedVersions.reduce((latestMessage, updateVersion, index, originalArray) => {
|
165
|
-
// if (Object.keys(updateVersion).length) {
|
166
|
-
// const packageName = Object.keys(updateVersion)[0];
|
167
|
-
// const version = updateVersion[packageName];
|
168
|
-
// let message = `${packageName} to ${version}`;
|
169
|
-
// if (index <= originalArray.length - 2) {
|
170
|
-
// message = message + ', ';
|
171
|
-
// }
|
172
|
-
// latestMessage = latestMessage + message;
|
173
|
-
// }
|
174
|
-
// return latestMessage;
|
175
|
-
// }, `${prefix} `);
|
176
|
-
// return `${versionMessage} ${suffix}`;
|
177
164
|
}
|
178
165
|
|
179
166
|
function commitChanges(updatedVersions, commitUrl) {
|
180
|
-
const commitMessage = builderVersionChangeMessage('Update', updatedVersions, '.');
|
167
|
+
const commitMessage = builderVersionChangeMessage('Update', updatedVersions, '. [skip ci]');
|
181
168
|
|
182
169
|
if (commitMessage) {
|
183
170
|
// 向git缓冲区中添加变更
|
@@ -191,9 +178,9 @@ function commitChanges(updatedVersions, commitUrl) {
|
|
191
178
|
console.log(`executing git push ${branch}`);
|
192
179
|
// 提交变更集
|
193
180
|
if (commitUrl) {
|
194
|
-
return childProcess.exec("git", ["push",
|
181
|
+
return childProcess.exec("git", ["push", commitUrl]);
|
195
182
|
} else {
|
196
|
-
return childProcess.exec('git', ['push'
|
183
|
+
return childProcess.exec('git', ['push']);
|
197
184
|
}
|
198
185
|
}
|
199
186
|
}
|
@@ -208,14 +195,14 @@ function tagMonoWorkspace(monoWorkspace, commitUrl) {
|
|
208
195
|
// const tagMessage = builderVersionChangeMessage('Publish npm packages ', monoWorkspace.updateResult, '.');
|
209
196
|
const date = moment(new Date());
|
210
197
|
const tagVersion = `v${date.format('YYYYMMDDHHmmss')}`;
|
211
|
-
childProcess.execSync('git', ['tag', tagVersion, '-m', 'Publish npm packages']);
|
198
|
+
childProcess.execSync('git', ['tag', tagVersion, '-m', 'Publish npm packages. [skip ci]']);
|
212
199
|
// 提交变更集
|
213
200
|
if (commitUrl) {
|
214
|
-
console.log(`git push --tags
|
215
|
-
return childProcess.exec("git", ["push", '--tags',
|
201
|
+
console.log(`git push --tags ${commitUrl}`);
|
202
|
+
return childProcess.exec("git", ["push", '--tags', commitUrl]);
|
216
203
|
} else {
|
217
|
-
console.log(`git push --tags
|
218
|
-
return childProcess.exec('git', ['push', '--tags',
|
204
|
+
console.log(`git push --tags`);
|
205
|
+
return childProcess.exec('git', ['push', '--tags',]);
|
219
206
|
}
|
220
207
|
}
|
221
208
|
|