amguerrero / sfdc_ant_tasks

Salesforce.com ANT Deployment Helper Tasks
14 stars 5 forks source link

DeltaDeployment task API version #8

Closed florianhoehn closed 7 years ago

florianhoehn commented 7 years ago

Hey @amguerrero

The delta deployment is working really well however there are two minor issues that I ran into and had to correct manually:

Thanks! Appreciate your hard work on this :)

amguerrero commented 7 years ago

Hey @florianhoehn,

I have just pushed a change that allows you to define the package version as an attribute for the delta deployment ant task, the attribute is packageVersion. You can configure it in the build.xml file like this:

<!-- define the delta deployment task -->
<taskdef name="deltaDeployment"
    classpath="libs/SalesforceAntTasks-with-dependencies.jar"
    classname="sfanttasks.sfdeltadeployment.SFDeltaDeploymentTask" />

<!-- Use deltaDeployment task defining the package -->
<target name="get-delta-package">
    <deltaDeployment deltaFolder="delta"
        packageVersion="39.0"
        previousDeployment="v.1.0.1" />
</target>

Besides that I added to the default delta deployment task configuration the FlowDefinition metadata type, so with no extra configuration FlowDefinitions are now included in the delta package.

It was possible to change the package version and add the FlowDefinition via configuration, but I understand it's a bit cumbersome :) You can create a config JSON file for delta deployment following the /config/packageConfig.json (i.e. you can create it with the same name config/packageConfig.json and then use it when you call deltaDeployment like this:

<target name="get-delta-package">
    <deltaDeployment deltaFolder="delta"
        configFile="config/packageConfig.json"
        previousDeployment="v.1.0.1" />
</target>

If you use configFile with a version defined and you also define a version when as an attribute in the delta deployment ant task, it will use the package version in the attribute, it has priority over the one in the config file.

I hope it helps :)

florianhoehn commented 7 years ago

Brilliant! Thanks @amguerrero !