@farris/cli 1.0.19 → 1.0.22
Sign up to get free protection for your applications and to get access to all the features.
- package/ci/cli.js +4 -4
- package/package.json +1 -1
package/ci/cli.js
CHANGED
@@ -156,8 +156,8 @@ function hasTags() {
|
|
156
156
|
* @returns 检查结果
|
157
157
|
*/
|
158
158
|
function checkProjectChanges(projectInfo, lastCommit) {
|
159
|
-
const projectPath = projectInfo
|
160
|
-
const packageName = projectInfo
|
159
|
+
const projectPath = projectInfo.project.path;
|
160
|
+
const packageName = projectInfo.package.name || projectPath;
|
161
161
|
return childProcess
|
162
162
|
// 使用 git diff 命令查询自上传提交以来,目标工程路径下是否有变更的文件
|
163
163
|
.exec("git", ["diff", "--name-only", lastCommit, projectPath])
|
@@ -184,7 +184,7 @@ function checkProjectChanges(projectInfo, lastCommit) {
|
|
184
184
|
*/
|
185
185
|
function updateProjectVersion(projectInfo, updateVersionType) {
|
186
186
|
let npmCommandArray = [];
|
187
|
-
const projectPath = projectInfo
|
187
|
+
const projectPath = projectInfo.project.path;
|
188
188
|
if (!projectPath) {
|
189
189
|
throw new Error(`update project version error: you must provide project path by project info object.`)
|
190
190
|
}
|
@@ -361,7 +361,7 @@ function publish(commitUrl, updateVersionType) {
|
|
361
361
|
const projects = monoWorkspace.projects;
|
362
362
|
const checkProjects = projects.map((projectInfo) => {
|
363
363
|
const lastCommit = getLastCommit();
|
364
|
-
console.log(`last commit ${lastCommit}`);
|
364
|
+
console.log(`last commit ${lastCommit}`);
|
365
365
|
let checkPromise = checkProjectChanges(projectInfo, lastCommit);
|
366
366
|
let changedPromise = checkPromise.then(hasChanged => {
|
367
367
|
projectInfo.hasChanged = hasChanged;
|