|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<Project> |
| 3 | + <UsingTask TaskName="GetVersion" AssemblyFile="$(GitVersionAssemblyFile)"/> |
| 4 | + <UsingTask TaskName="WriteVersionInfoToBuildLog" AssemblyFile="$(GitVersionAssemblyFile)" /> |
| 5 | + |
| 6 | + <Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(WriteVersionInfoToBuildLog) == 'true'"> |
| 7 | + <WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"/> |
| 8 | + </Target> |
| 9 | + |
| 10 | + <Target Name="UpdateAssemblyInfo" DependsOnTargets="_UpdateAssemblyInfo;DispatchToInnerBuilds" /> |
| 11 | + <Target Name="_UpdateAssemblyInfo"> |
| 12 | + <PropertyGroup> |
| 13 | + <InnerTargets>UpdateAssemblyInfo</InnerTargets> |
| 14 | + </PropertyGroup> |
| 15 | + </Target> |
| 16 | + |
| 17 | + <Target Name="GenerateGitVersionInformation" DependsOnTargets="_GenerateGitVersionInformation;DispatchToInnerBuilds" /> |
| 18 | + <Target Name="_GenerateGitVersionInformation"> |
| 19 | + <PropertyGroup> |
| 20 | + <InnerTargets>GenerateGitVersionInformation</InnerTargets> |
| 21 | + </PropertyGroup> |
| 22 | + </Target> |
| 23 | + |
| 24 | + <Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'"> |
| 25 | + <GetVersion SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"> |
| 26 | + <Output TaskParameter="Major" PropertyName="GitVersion_Major" /> |
| 27 | + <Output TaskParameter="Minor" PropertyName="GitVersion_Minor" /> |
| 28 | + <Output TaskParameter="Patch" PropertyName="GitVersion_Patch" /> |
| 29 | + <Output TaskParameter="PreReleaseTag" PropertyName="GitVersion_PreReleaseTag" /> |
| 30 | + <Output TaskParameter="PreReleaseTagWithDash" PropertyName="GitVersion_PreReleaseTagWithDash" /> |
| 31 | + <Output TaskParameter="PreReleaseLabel" PropertyName="GitVersion_PreReleaseLabel" /> |
| 32 | + <Output TaskParameter="PreReleaseNumber" PropertyName="GitVersion_PreReleaseNumber" /> |
| 33 | + <Output TaskParameter="BuildMetaData" PropertyName="GitVersion_BuildMetaData" /> |
| 34 | + <Output TaskParameter="BuildMetaDataPadded" PropertyName="GitVersion_BuildMetaDataPadded" /> |
| 35 | + <Output TaskParameter="FullBuildMetaData" PropertyName="GitVersion_FullBuildMetaData" /> |
| 36 | + <Output TaskParameter="MajorMinorPatch" PropertyName="GitVersion_MajorMinorPatch" /> |
| 37 | + <Output TaskParameter="SemVer" PropertyName="GitVersion_SemVer" /> |
| 38 | + <Output TaskParameter="LegacySemVer" PropertyName="GitVersion_LegacySemVer" /> |
| 39 | + <Output TaskParameter="LegacySemVerPadded" PropertyName="GitVersion_LegacySemVerPadded" /> |
| 40 | + <Output TaskParameter="AssemblySemVer" PropertyName="GitVersion_AssemblySemVer" /> |
| 41 | + <Output TaskParameter="AssemblySemFileVer" PropertyName="GitVersion_AssemblySemFileVer" /> |
| 42 | + <Output TaskParameter="FullSemVer" PropertyName="GitVersion_FullSemVer" /> |
| 43 | + <Output TaskParameter="InformationalVersion" PropertyName="GitVersion_InformationalVersion" /> |
| 44 | + <Output TaskParameter="BranchName" PropertyName="GitVersion_BranchName" /> |
| 45 | + <Output TaskParameter="Sha" PropertyName="GitVersion_Sha" /> |
| 46 | + <Output TaskParameter="NuGetVersionV2" PropertyName="GitVersion_NuGetVersionV2" /> |
| 47 | + <Output TaskParameter="NuGetVersion" PropertyName="GitVersion_NuGetVersion" /> |
| 48 | + <Output TaskParameter="NuGetPreReleaseTagV2" PropertyName="GitVersion_NuGetPreReleaseTagV2" /> |
| 49 | + <Output TaskParameter="NuGetPreReleaseTag" PropertyName="GitVersion_NuGetPreReleaseTag" /> |
| 50 | + <Output TaskParameter="CommitDate" PropertyName="GitVersion_CommitDate" /> |
| 51 | + <Output TaskParameter="CommitsSinceVersionSource" PropertyName="GitVersion_CommitsSinceVersionSource" /> |
| 52 | + <Output TaskParameter="CommitsSinceVersionSourcePadded" PropertyName="GitVersion_CommitsSinceVersionSourcePadded" /> |
| 53 | + </GetVersion> |
| 54 | + |
| 55 | + <PropertyGroup Condition=" '$(UpdateVersionProperties)' == 'true' "> |
| 56 | + <Version>$(GitVersion_FullSemVer)</Version> |
| 57 | + <VersionPrefix>$(GitVersion_MajorMinorPatch)</VersionPrefix> |
| 58 | + <VersionSuffix Condition=" '$(UseFullSemVerForNuGet)' == 'false' ">$(GitVersion_NuGetPreReleaseTag)</VersionSuffix> |
| 59 | + <VersionSuffix Condition=" '$(UseFullSemVerForNuGet)' == 'true' ">$(GitVersion_PreReleaseTag)</VersionSuffix> |
| 60 | + <PackageVersion Condition=" '$(UseFullSemVerForNuGet)' == 'false' ">$(GitVersion_NuGetVersion)</PackageVersion> |
| 61 | + <PackageVersion Condition=" '$(UseFullSemVerForNuGet)' == 'true' ">$(GitVersion_FullSemVer)</PackageVersion> |
| 62 | + <InformationalVersion Condition=" '$(InformationalVersion)' == '' ">$(GitVersion_InformationalVersion)</InformationalVersion> |
| 63 | + <AssemblyVersion Condition=" '$(AssemblyVersion)' == '' ">$(GitVersion_AssemblySemVer)</AssemblyVersion> |
| 64 | + <FileVersion Condition=" '$(FileVersion)' == '' ">$(GitVersion_AssemblySemFileVer)</FileVersion> |
| 65 | + </PropertyGroup> |
| 66 | + </Target> |
| 67 | + |
| 68 | +</Project> |
0 commit comments