Fix test-publish CI test when no packages exist to publish
This commit is contained in:
parent
b86473f3c7
commit
398097900c
@ -76,18 +76,22 @@ export const utils = {
|
|||||||
return updatedPackages;
|
return updatedPackages;
|
||||||
},
|
},
|
||||||
async getLernaUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise<UpdatedPackage[]> {
|
async getLernaUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise<UpdatedPackage[]> {
|
||||||
const result = await execAsync(`${constants.lernaExecutable} updated --json`, {
|
try {
|
||||||
cwd: constants.monorepoRootPath,
|
const result = await execAsync(`${constants.lernaExecutable} updated --json`, {
|
||||||
});
|
cwd: constants.monorepoRootPath,
|
||||||
if (result.stdout === '') {
|
});
|
||||||
|
if (result.stdout === '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const updatedPackages = JSON.parse(result.stdout);
|
||||||
|
if (!shouldIncludePrivate) {
|
||||||
|
const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private);
|
||||||
|
return updatedPublicPackages;
|
||||||
|
}
|
||||||
|
return updatedPackages;
|
||||||
|
} catch (err) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const updatedPackages = JSON.parse(result.stdout);
|
|
||||||
if (!shouldIncludePrivate) {
|
|
||||||
const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private);
|
|
||||||
return updatedPublicPackages;
|
|
||||||
}
|
|
||||||
return updatedPackages;
|
|
||||||
},
|
},
|
||||||
async getNextPackageVersionAsync(
|
async getNextPackageVersionAsync(
|
||||||
currentVersion: string,
|
currentVersion: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user