NOTE: All commands running -c
flag for check-only
- Run
npm run build
(creates Scratch Org > Geneartes manifest > tries to deploy with destructive changes)
- Create a Manifest with the source metadata:
sfdx force source manifest create -p force-app -o temp
- Deploy the manifest with Destructive Changes:
sfdx force source deploy --manifest temp/package.xml --predestructivechanges destructiveChangesPre.xml --postdestructivechanges ackage.xml --predestructivechanges destructiveChangesPre.xml --postdestructivechanges destructiveChangesPost.xml -g -c -u TARGET_ORG_ALIAS
Run npm run mdapi:build
(converts metadata into temp_metadata > copies destructiveChanges into temp_metadata > performs deployment)