13

Is it possible to change how TDS decides which items should be added to a TDS Delta Package? At the moment TDS looks at the Updated date of the item but we would like to be able to supply a manifest of items to TDS based on source control check-ins or other criteria.

Has anyone customised TDS in this way?

1 Answer 1

16

In your project, override the behavior of the follow MSBuild task.

<Target Name="GetCullItemsFromProjectParameters">

By default, this is what TDS is doing (as seen in the .targets file)

<CullItemsFromProjectClass Condition=" '$(IncludeItemsChangedAfter)' != ''">HedgehogDevelopment.SitecoreProject.Tasks.Filters.CullItemsFromProjectByUpdateDate, HedgehogDevelopment.SitecoreProject.Tasks</CullItemsFromProjectClass>
<CullItemsFromProjectParameters>$(IncludeItemsChangedAfter)</CullItemsFromProjectParameters>

Override this with your own functionality that implements 'True' CI with Delta packages would mean extracting the list of .item files that were edited in your branch since the cutoff for the last deployment. This would have to include all items edited before the last deployment....but were added, edited or merged into the branch since that last cutoff. You might need to:-

  • pre-build a list that connects to source control and extracts the list of these files
  • in your item culling code, read from that list, and only include them in the delta package

An example of how I've done this for Git can be found here:-

http://www.seanholmesby.com/true-delta-deploys-with-tds-classic/ https://github.com/SaintSkeeta/TDS.BuildExtensions.GitDeltaDeploy https://www.nuget.org/packages/Hedgehog.TDS.BuildExtensions.GitDeltaDeploy

1
  • Version 2.0.0 of GitDeltaDeploy now available: bit.ly/2jkVeAe Includes some minor bug fixes and updates to allow for tags (not just commit hashes), delta on files and promoting built commit hash.
    – jrap
    Commented Sep 12, 2017 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.