Delta Builder
Built on sfdx-git-delta, the SGD plugin created by scolladon. Delta Builder only adds a VS Code front end; all the delta logic comes from sfdx-git-delta.
A VS Code panel for building Salesforce delta packages with sf sgd source delta (sfdx-git-delta).
Usage
Command Palette → Delta Builder: Open Delta Builder. You can also right-click in the Explorer. This opens the Delta Builder tab, where all options are shown on one form:
- From (baseline) and To: both boxes offer the same list:
HEAD, local and remote branches, tags (v… release tags, then test-v…, then others, newest first), and the last 200 commits on your current checkout. From lists tags first; To lists HEAD and branches first.
- Click the box or press ↓ to open the list. The All / Tags / Branches / Commits tabs narrow it, and so does Alt+←/→. On All, each group shows its first few entries with a link to show the rest.
- Type to search. Every word must appear in the name, commit message or date, and matches are highlighted. ↑/↓ and Enter pick an entry.
- You can also type or paste anything git understands, such as a full or short commit SHA,
HEAD~3, or a ref you haven't fetched. The Use "…" entry at the top keeps exactly what you typed.
- When you pick or leave a value, the commit it points to is shown under the box (short SHA, message, age).
- Source folder: suggested from
packageDirectories in sfdx-project.json (default force-app).
- Output folder: defaults to
./delta. If the folder isn't empty, you're asked whether to clear it.
- Copy changed source: adds
--generate-delta.
- More options (collapsed; the heading shows how many are set, and it opens if one has an error): one line per optional sfdx-git-delta flag. Empty fields and unchecked boxes are left out of the command.
--merge-base, --ignore-whitespace: checkboxes.
--ignore-file, --ignore-destructive-file, --include-file, --include-destructive-file, --additional-metadata-registry: paths relative to the repo root. The file must exist.
--api-version: a version such as 62.0.
--changes-manifest: the path of the JSON file to write.
Each field is checked when you leave it, and the command that will run is shown below the form. Refresh refs reloads tags and branches, for example after a git fetch.
When you click Generate Delta, the extension checks that sf is on your PATH and installs the sfdx-git-delta plugin if it's missing. The command runs in the repository root, and its output streams into the panel and the Delta Builder output channel. When it finishes, you can open package/package.xml or reveal the output folder. The extension remembers your last values for each workspace.
Deploy
Below the form, Deploy sends the generated delta to an org with sf project deploy start, using package/package.xml and, when the delta deletes something, destructiveChanges/destructiveChanges.xml as post-destructive changes.
- Target org: every org you're logged in to (
sf org list), grouped into sandboxes, production and scratch orgs. Type any part of an alias, username, instance URL or org ID to filter. Production orgs are flagged under the box.
- Tests to run: Org default,
NoTestRun, RunSpecifiedTests, RunLocalTests or RunAllTestsInOrg. For RunSpecifiedTests, list the test classes (or Class.method) separated by commas or spaces. NoTestRun is blocked for production orgs.
- Dry run (validate only) is ticked every time the panel opens. Untick it to really deploy; you're asked to confirm first, with the number of components to deploy and delete. If your checkout isn't at To, the confirmation says so, because sf deploys the files in your working folder.
Refresh orgs reloads the list after sf org login web.
Install
npx @vscode/vsce package
code --install-extension delta-builder-1.1.0.vsix
| |