Open
Description
Sometimes it's useful to take just the first item on a list, or the last. This is currently very cumbersome, to the point that it's "easier" just write an inline task to do so.
A new First()
and Last()
item function would simplify things a lot.
Usage example:
<Target Name="Split">
<ItemGroup>
<BranchParts Include="release;v1.3.1" />
</ItemGroup>
<Message Text="@(BranchParts -> Last())" Importance="high" />
<Message Text="@(BranchParts -> First())" Importance="high" />
</Target>
Renders:
v1.3.0
release