Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable F# exe projects to use GitVersionTask #1896

Merged
merged 12 commits into from
Nov 7, 2019
14 changes: 10 additions & 4 deletions src/GitVersionTask/build/GitVersionTask.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
<Output TaskParameter="AssemblyInfoTempFilePath" PropertyName="AssemblyInfoTempFilePath" />
</UpdateAssemblyInfo>

<ItemGroup>
<ItemGroup Condition="'$(Language)' == 'F#'">
<CompileBefore Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>
<ItemGroup Condition="'$(Language)' != 'F#'">
<Compile Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>

Expand All @@ -44,14 +47,17 @@
<Output TaskParameter="GitVersionInformationFilePath" PropertyName="GitVersionInformationFilePath" />
</GenerateGitVersionInformation>

<ItemGroup>
<ItemGroup Condition="'$(Language)' == 'F#'">
<CompileBefore Include="$(GitVersionInformationFilePath)" />
<FileWrites Include="$(GitVersionInformationFilePath)" />
</ItemGroup>
<ItemGroup Condition="'$(Language)' != 'F#'">
<Compile Include="$(GitVersionInformationFilePath)" />
<FileWrites Include="$(GitVersionInformationFilePath)" />
</ItemGroup>

</Target>

<Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;_GetOutputItemsFromPack;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'">
<Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;_GetOutputItemsFromPack;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'">

<GetVersion SolutionDirectory="$(GitVersionPath)" ConfigFilePath="$(GitVersionConfig)" NoFetch="$(GitVersion_NoFetchEnabled)">
<Output TaskParameter="Major" PropertyName="GitVersion_Major" />
Expand Down