|
21 | 21 | <UpdateAssemblyInfo Condition=" '$(UpdateAssemblyInfo)' == '' and '$(TargetFramework)' != '' ">false</UpdateAssemblyInfo> |
22 | 22 | <UpdateAssemblyInfo Condition=" '$(UpdateAssemblyInfo)' == '' and '$(NCrunch)' != '' ">false</UpdateAssemblyInfo> |
23 | 23 | <UpdateAssemblyInfo Condition=" '$(UpdateAssemblyInfo)' == '' ">true</UpdateAssemblyInfo> |
24 | | - |
| 24 | + |
25 | 25 | <!-- Property that enables setting of Version --> |
26 | 26 | <UpdateVersionProperties Condition=" '$(UpdateVersionProperties)' == '' ">true</UpdateVersionProperties> |
27 | 27 | <UseFullSemVerForNuGet Condition=" '$(UseFullSemVerForNuGet)' == '' ">false</UseFullSemVerForNuGet> |
|
48 | 48 | <Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(WriteVersionInfoToBuildLog) == 'true'"> |
49 | 49 | <WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"/> |
50 | 50 | </Target> |
51 | | - |
| 51 | + |
52 | 52 | <Target Name="UpdateAssemblyInfo" BeforeTargets="CoreCompile" Condition="$(UpdateAssemblyInfo) == 'true'"> |
53 | 53 | <UpdateAssemblyInfo |
54 | 54 | SolutionDirectory="$(GitVersionPath)" |
|
66 | 66 | <Compile Include="$(AssemblyInfoTempFilePath)" /> |
67 | 67 | </ItemGroup> |
68 | 68 | </Target> |
69 | | - |
| 69 | + |
70 | 70 | <Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'"> |
71 | 71 |
|
72 | 72 | <GetVersion SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"> |
73 | 73 | <Output TaskParameter="Major" PropertyName="GitVersion_Major" /> |
74 | 74 | <Output TaskParameter="Minor" PropertyName="GitVersion_Minor" /> |
75 | 75 | <Output TaskParameter="Patch" PropertyName="GitVersion_Patch" /> |
| 76 | + <Output TaskParameter="PreReleaseTag" PropertyName="GitVersion_PreReleaseTag" /> |
| 77 | + <Output TaskParameter="PreReleaseTagWithDash" PropertyName="GitVersion_PreReleaseTagWithDash" /> |
| 78 | + <Output TaskParameter="PreReleaseLabel" PropertyName="GitVersion_PreReleaseLabel" /> |
| 79 | + <Output TaskParameter="PreReleaseNumber" PropertyName="GitVersion_PreReleaseNumber" /> |
76 | 80 | <Output TaskParameter="BuildMetaData" PropertyName="GitVersion_BuildMetaData" /> |
77 | 81 | <Output TaskParameter="BuildMetaDataPadded" PropertyName="GitVersion_BuildMetaDataPadded" /> |
78 | 82 | <Output TaskParameter="FullBuildMetaData" PropertyName="GitVersion_FullBuildMetaData" /> |
79 | | - <Output TaskParameter="BranchName" PropertyName="GitVersion_BranchName" /> |
80 | | - <Output TaskParameter="Sha" PropertyName="GitVersion_Sha" /> |
81 | 83 | <Output TaskParameter="MajorMinorPatch" PropertyName="GitVersion_MajorMinorPatch" /> |
82 | 84 | <Output TaskParameter="SemVer" PropertyName="GitVersion_SemVer" /> |
83 | 85 | <Output TaskParameter="LegacySemVer" PropertyName="GitVersion_LegacySemVer" /> |
84 | 86 | <Output TaskParameter="LegacySemVerPadded" PropertyName="GitVersion_LegacySemVerPadded" /> |
85 | | - <Output TaskParameter="FullSemVer" PropertyName="GitVersion_FullSemVer" /> |
86 | 87 | <Output TaskParameter="AssemblySemVer" PropertyName="GitVersion_AssemblySemVer" /> |
| 88 | + <Output TaskParameter="AssemblySemFileVer" PropertyName="GitVersion_AssemblySemFileVer" /> |
| 89 | + <Output TaskParameter="FullSemVer" PropertyName="GitVersion_FullSemVer" /> |
| 90 | + <Output TaskParameter="InformationalVersion" PropertyName="GitVersion_InformationalVersion" /> |
| 91 | + <Output TaskParameter="BranchName" PropertyName="GitVersion_BranchName" /> |
| 92 | + <Output TaskParameter="Sha" PropertyName="GitVersion_Sha" /> |
| 93 | + <Output TaskParameter="NuGetVersionV2" PropertyName="GitVersion_NuGetVersionV2" /> |
87 | 94 | <Output TaskParameter="NuGetVersion" PropertyName="GitVersion_NuGetVersion" /> |
| 95 | + <Output TaskParameter="NuGetPreReleaseTagV2" PropertyName="GitVersion_NuGetPreReleaseTagV2" /> |
88 | 96 | <Output TaskParameter="NuGetPreReleaseTag" PropertyName="GitVersion_NuGetPreReleaseTag" /> |
89 | | - <Output TaskParameter="PreReleaseTag" PropertyName="GitVersion_PreReleaseTag" /> |
90 | | - <Output TaskParameter="PreReleaseTagWithDash" PropertyName="GitVersion_PreReleaseTagWithDash" /> |
91 | | - <Output TaskParameter="PreReleaseLabel" PropertyName="GitVersion_PreReleaseLabel" /> |
92 | | - <Output TaskParameter="PreReleaseNumber" PropertyName="GitVersion_PreReleaseNumber" /> |
93 | | - <Output TaskParameter="InformationalVersion" PropertyName="GitVersion_InformationalVersion" /> |
94 | 97 | <Output TaskParameter="CommitDate" PropertyName="GitVersion_CommitDate" /> |
95 | 98 | <Output TaskParameter="CommitsSinceVersionSource" PropertyName="GitVersion_CommitsSinceVersionSource" /> |
96 | 99 | <Output TaskParameter="CommitsSinceVersionSourcePadded" PropertyName="GitVersion_CommitsSinceVersionSourcePadded" /> |
97 | 100 | </GetVersion> |
98 | | - |
| 101 | + |
99 | 102 | <PropertyGroup Condition=" '$(UpdateVersionProperties)' == 'true' "> |
100 | 103 | <Version>$(GitVersion_FullSemVer)</Version> |
101 | 104 | <VersionPrefix>$(GitVersion_MajorMinorPatch)</VersionPrefix> |
|
105 | 108 | <PackageVersion Condition=" '$(UseFullSemVerForNuGet)' == 'true' ">$(GitVersion_FullSemVer)</PackageVersion> |
106 | 109 | <InformationalVersion Condition=" '$(InformationalVersion)' == '' ">$(GitVersion_InformationalVersion)</InformationalVersion> |
107 | 110 | <AssemblyVersion Condition=" '$(AssemblyVersion)' == '' ">$(GitVersion_AssemblySemVer)</AssemblyVersion> |
108 | | - <FileVersion Condition=" '$(FileVersion)' == '' ">$(GitVersion_MajorMinorPatch).$(GitVersion_CommitsSinceVersionSource)</FileVersion> |
| 111 | + <FileVersion Condition=" '$(FileVersion)' == '' ">$(GitVersion_AssemblySemFileVer)</FileVersion> |
109 | 112 | </PropertyGroup> |
110 | 113 |
|
111 | 114 | </Target> |
|
0 commit comments