Skip to content

Commit

Permalink
Destructive changes output
Browse files Browse the repository at this point in the history
  • Loading branch information
gfarb committed Aug 26, 2022
1 parent 90dfdc4 commit f6af3ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ inputs:
outputs:
DEPLOYED:
description: "Boolean value that identifies if the deployment was successful."
DESTRUCTIVE_CHANGES:
description: "Boolean value that identifies if destructive changes were made."
runs:
using: "node16"
main: "index.js"
Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ async function constructDestructiveChangesArgs(SfdxArguments) {
"--postdestructivechanges",
`${SfdxArguments.pathToDestructiveChanges}/destructiveChangesPost.xml`
);
core.setOutput("DESTRUCTIVE_CHANGES", true);
} else if (file === "destructiveChangesPre.xml") {
SfdxArguments.destructiveChanges.push(
"--predestructivechanges",
`${SfdxArguments.pathToDestructiveChanges}/destructiveChangesPre.xml`
);
core.setOutput("DESTRUCTIVE_CHANGES", true);
} else {
core.setOutput("DESTRUCTIVE_CHANGES", false);
}
}
}
Expand All @@ -37,7 +41,7 @@ function deploy(SfdxArguments) {
"--manifestname",
"temp-deploy-manifest",
],
"An error occured while trying to run force:source:manifest:create."
"An error occurred while trying to run force:source:manifest:create."
);
GenerateManifestCommand.run();
if (!GenerateManifestCommand.succeeded) return;
Expand All @@ -57,7 +61,7 @@ function deploy(SfdxArguments) {
deployArgs.push("--wait", SfdxArguments.timeout);
const DeployCommand = new SfdxCommand(
deployArgs,
"An error occured while trying to run force:source:deploy."
"An error occurred while trying to run force:source:deploy."
);
DeployCommand.run();
if (DeployCommand.succeeded === true) core.setOutput("DEPLOYED", true);
Expand Down

0 comments on commit f6af3ed

Please sign in to comment.