Reputation: 11
I am using the Salesforce destructive changes mentioned here. However, sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output . --generate-delta command is not showing any destructive changes, it generates a destructiveChanges.xml without any deleted metadata.
--- destructiveChanges.xml generated with deleted metadata ---
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>52.0</version>
</Package>
Here is the content of the yml file I am using:
name: sf-destructivechanges
on:
push:
branches:
- "test"
jobs:
sf-destructivechanges:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Salesforce CLI
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
mkdir sfdx-cli
tar xJf sfdx-linux-amd64.tar.xz -C sfdx-cli --strip-components 1
./sfdx-cli/install
sfdx update
- name: Install plugin
run: |
echo 'y' | sfdx plugins:install sfdx-git-delta
- name: Get delta files with SGD
run: sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output . --generate-delta
- name: Deploy changes
run: |
echo "--- package.xml generated with added and modified metadata ---"
cat package/package.xml
echo
echo "---- Deploying added and modified metadata ----"
sfdx force:source:deploy -x package/package.xml -u ${{ secrets.USERNAME}}
- name: Destructive Changes
run: |
echo "--- destructiveChanges.xml generated with deleted metadata ---"
cat destructiveChanges/destructiveChanges.xml
echo
echo "--- Deleting removed metadata ---"
sfdx force:mdapi:deploy -d destructiveChanges -u ${{ secrets.USERNAME}} -w -1
Upvotes: 1
Views: 1938
Reputation: 422
I'm having the same issue and I believe its related to
(node:94996) Warning: Deprecated config name: apiVersion. Please use org-api-version instead.
(Use node --trace-warnings ...
to show where the warning was created)
{
"error": null,
"output": ".",
"success": true,
"warnings": []
}
Upvotes: 0