Skip to content

Commit

Permalink
fix(deploy): handle N/A in deployment breakdown
Browse files Browse the repository at this point in the history
  • Loading branch information
azlam-abdulsalam committed Aug 22, 2023
1 parent 6159b00 commit 8fc4fc7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,16 +558,19 @@ export default class DeployImpl {
packageName = `**${packageName}**`;
if(pkg.packageType==PackageType.Unlocked)
{
let versionInstalledInOrgConvertedToSemver = convertBuildNumDotDelimToHyphen(versionInstalledInOrg);
let versionNumberConvertedToSemver = convertBuildNumDotDelimToHyphen(versionNumber);
if(semver.diff(versionInstalledInOrgConvertedToSemver, versionNumberConvertedToSemver)=='prerelease')
{
promotionStatus = '![Already Promoted](https://img.shields.io/badge/Already%20Promoted-red.svg)';
}
else
{
if (versionInstalledInOrg == "N/A") {
promotionStatus = '![Pending](https://img.shields.io/badge/Pending-yellow.svg)';
}
else {
let versionInstalledInOrgConvertedToSemver = convertBuildNumDotDelimToHyphen(versionInstalledInOrg);
let versionNumberConvertedToSemver = convertBuildNumDotDelimToHyphen(versionNumber);
if (semver.diff(versionInstalledInOrgConvertedToSemver, versionNumberConvertedToSemver) == 'prerelease') {
promotionStatus = '![Already Promoted](https://img.shields.io/badge/Already%20Promoted-red.svg)';
}
else {
promotionStatus = '![Pending](https://img.shields.io/badge/Pending-yellow.svg)';
}
}
}
versionNumber = `**${versionNumber}**`;
versionInstalledInOrg = `**${versionInstalledInOrg}**`;
Expand Down

0 comments on commit 8fc4fc7

Please sign in to comment.