Skip to content

Commit

Permalink
Merge pull request #956 from Accenture/bugfix/734-automation-not-docu…
Browse files Browse the repository at this point in the history
…mented-on-deploy

#734: run document on postDeploy of automation
  • Loading branch information
JoernBerkefeld authored Jun 2, 2023
2 parents 3e54f4a + 87ce125 commit a3b36ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/metadataTypes/Automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,15 @@ class Automation extends MetadataType {
*/
static async deploy(metadata, targetBU, retrieveDir, isRefresh) {
const upsertResults = await this.upsert(metadata, targetBU, isRefresh);
await this.saveResults(upsertResults, retrieveDir, null);
const savedMetadata = await this.saveResults(upsertResults, retrieveDir, null);
if (
this.properties.metaDataTypes.documentOnRetrieve.includes(this.definition.type) &&
!this.definition.documentInOneFile
) {
const count = Object.keys(savedMetadata).length;
Util.logger.debug(` - Running document for ${count} record${count === 1 ? '' : 's'}`);
await this.document(savedMetadata);
}
return upsertResults;
}

Expand Down

0 comments on commit a3b36ba

Please sign in to comment.