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