From d755755d834fe77f01fc40df77084d681f3178d2 Mon Sep 17 00:00:00 2001 From: azlam Date: Wed, 23 Aug 2023 12:35:39 +1000 Subject: [PATCH] fix(deploy): add correct status of install --- .../sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts index 7c3473ba6..0202ba38d 100644 --- a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts +++ b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts @@ -552,16 +552,16 @@ export default class DeployImpl { let isPackageToBeInstalled = pkgInfo.isPackageInstalled ? 'No' : 'Yes'; let promotionStatus = 'N/A'; - if(isPackageToBeInstalled=="Yes" && props.promotePackagesBeforeDeploymentToOrg == props.targetUsername) + if(isPackageToBeInstalled=="Yes") { isPackageToBeInstalled = `![Yes](https://img.shields.io/badge/Yes-green.svg)`; packageName = `**${packageName}**`; if(pkg.packageType==PackageType.Unlocked) { - if (versionInstalledInOrg == "N/A") { + if (props.promotePackagesBeforeDeploymentToOrg == props.targetUsername && versionInstalledInOrg == "N/A") { promotionStatus = '![Pending](https://img.shields.io/badge/Pending-yellow.svg)'; } - else { + else if(props.promotePackagesBeforeDeploymentToOrg == props.targetUsername ) { let versionInstalledInOrgConvertedToSemver = convertBuildNumDotDelimToHyphen(versionInstalledInOrg); let versionNumberConvertedToSemver = convertBuildNumDotDelimToHyphen(versionNumber); if (semver.diff(versionInstalledInOrgConvertedToSemver, versionNumberConvertedToSemver) == 'prerelease') { @@ -571,6 +571,10 @@ export default class DeployImpl { promotionStatus = '![Pending](https://img.shields.io/badge/Pending-yellow.svg)'; } } + else + { + promotionStatus = 'N/A'; + } } versionNumber = `**${versionNumber}**`;