Skip to content

Commit

Permalink
fix(deploy): add correct status of install
Browse files Browse the repository at this point in the history
  • Loading branch information
azlam-abdulsalam committed Aug 23, 2023
1 parent eca3e28 commit d755755
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -571,6 +571,10 @@ export default class DeployImpl {
promotionStatus = '![Pending](https://img.shields.io/badge/Pending-yellow.svg)';
}
}
else
{
promotionStatus = 'N/A';
}
}

versionNumber = `**${versionNumber}**`;
Expand Down

0 comments on commit d755755

Please sign in to comment.