-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBuild.proj
27 lines (22 loc) · 1.03 KB
/
Build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" />
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<SolutionRoot>$(MSBuildProjectDirectory)</SolutionRoot>
</PropertyGroup>
<ItemGroup>
<RegexTransform Include="$(SolutionRoot)\CommonAssemblyInfo.cs">
<Find>(?<major>\d+)\.(?<minor>\d+)\.\d+\.(?<revision>\d+)</Find>
<ReplaceWith>$(BUILD_NUMBER)</ReplaceWith>
</RegexTransform>
</ItemGroup>
<Target Name="Go" DependsOnTargets="UpdateAssemblyVersion; Build">
</Target>
<Target Name="UpdateAssemblyVersion" Condition="'$(BUILD_NUMBER)' != ''">
<RegexTransform Items="@(RegexTransform)" />
</Target>
<Target Name="Build">
<MSBuild Projects="$(SolutionRoot)\BuildVersionTest.sln" Targets="Build" />
</Target>
</Project>