forked from fluentscheduler/FluentScheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.build
21 lines (16 loc) · 1.18 KB
/
default.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Default">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<PropertyGroup>
<build_number Condition="'$(teamcity_version)' == ''">1.0.0</build_number>
</PropertyGroup>
<Target Name="UpdateVersion">
<ItemGroup>
<AssemblyInfoFiles Include="**\AssemblyInfo.cs" />
<NuspecFiles Include="**\package.nuspec" />
</ItemGroup>
<Message Text="Updating assembly versions: @(AssemblyInfoFiles->'%(RecursiveDir)%(Filename)%(Extension)')"/>
<FileUpdate Files="@(AssemblyInfoFiles->'%(RecursiveDir)%(Filename)%(Extension)')" Regex="AssemblyVersion\("([^"]*)"\)" ReplacementText="AssemblyVersion("$(build_number)")" />
<FileUpdate Files="@(AssemblyInfoFiles->'%(RecursiveDir)%(Filename)%(Extension)')" Regex="AssemblyFileVersion\("([^"]*)"\)" ReplacementText="AssemblyFileVersion("$(build_number)")" />
<FileUpdate Files="@(NuspecFiles->'%(RecursiveDir)%(Filename)%(Extension)')" Regex="version>([^"<]*)</version" ReplacementText="version>$(build_number)</version" />
</Target>
</Project>