Deploy packages with MavensMate

It looks like the metadata MavensMate suggests deploying is based off of the current package.xml. The way I worked in the past was using a second package.xml, stored in some different directory, containing only the components that have changed since the last deploy. This is to keep deploys small and minimize the risk of side effects. Is there any way I can tell MavensMate to look at this file to build the metadata list or am I left with either deploying the whole package.xml or manually checking/unchecking components?

Answer

You can get this to work by editing the deploy/.config file in your MavensMate project. If you look at the contents of this file (which is created after you make a successful deployment) it is a JSON object that you can edit manually. The object contains one property: “deployments” which in turn contains 2 arrays: “named” and “timestamped”. Here’s a picture of what this JSON object looks like when you put it into Chrome DevTools: enter image description here

You can edit that object (one-time or in an automated way) to point to a package.xml file in a different directory and then re-insert it into deploy/.config. This package.xml file will then appear in your list of options under metadata in the MM deployment window.
enter image description here

Attribution
Source : Link , Question Author : Bob Roberts , Answer Author : abd3721

Leave a Comment