Skip to content

Commit

Permalink
fix(validate): add summary on failed validation
Browse files Browse the repository at this point in the history
  • Loading branch information
azlam-abdulsalam committed Sep 11, 2023
1 parent 5def984 commit ceae703
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook {
),
),
);

FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`### 💣 Deployment Failed 💣`);
deploymentResult.failed.map(
(packageInfo) => {
FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`Package validation failed for **${packageInfo.sfpPackage.packageName}**`);
}
);

}

SFPLogger.printHeaderLine('',COLOR_HEADER,LoggerLevel.INFO);
Expand Down Expand Up @@ -710,7 +718,7 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook {
const testResult = await apextestValidator.validateApexTests();

if (!testResult.result) {
FileOutputHandler.getInstance().writeOutput(`validation-error.md`,`### 💣 Validation Failed 💣`);
FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`### 💣 Validation Failed 💣`);
FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`Package validation failed for **${sfpPackage.packageName}**`);
FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`Reasons:`);
FileOutputHandler.getInstance().appendOutput(`validation-error.md`,`${testResult.message}`);
Expand Down

0 comments on commit ceae703

Please sign in to comment.