-
Notifications
You must be signed in to change notification settings - Fork 49
/
Master.proj
141 lines (111 loc) · 5.87 KB
/
Master.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Release</BuildConfiguration>
<BuildFolder>$(MSBuildProjectDirectory)\Build\$(BuildConfiguration)</BuildFolder>
<ToolFolder>$(MSBuildProjectDirectory)\Tools</ToolFolder>
<SourceFolder>$(MSBuildProjectDirectory)\Source</SourceFolder>
<PackageFolder>$(MSBuildProjectDirectory)\Build\Package</PackageFolder>
<MSBuildCommunityTasksPath>$(ToolFolder)\MSBuildTasks\tools</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets"/>
<PropertyGroup>
<BuildNumber Condition=" '$(APPVEYOR_BUILD_NUMBER)' != '' ">$(APPVEYOR_BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition=" '$(BUILD_NUMBER)' != '' ">$(BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
<Major Condition=" '$(Major)' == '' ">1</Major>
<Minor Condition=" '$(Minor)' == '' ">2</Minor>
<Patch Condition=" '$(Patch)' == '' ">0</Patch>
<AssemblyVersion>$(Major).$(Minor).0.0</AssemblyVersion>
<AssemblyFileVersion>$(Major).$(Minor).$(Patch).$(BuildNumber)</AssemblyFileVersion>
<AssemblyInformationalVersion>$(Major).$(Minor).$(Patch).$(BuildNumber)</AssemblyInformationalVersion>
<PackageVersion>$(Major).$(Minor).$(Patch).$(BuildNumber)</PackageVersion>
<InstallVersion>$(Major).$(Minor).$(BuildNumber)</InstallVersion>
</PropertyGroup>
<Target Name="Clean">
<DeleteTree Directories="**\obj\**;**\bin\**" />
<DeleteTree Directories="$(BuildFolder)" ContinueOnError="true" />
</Target>
<Target Name="Version">
<Time>
<Output TaskParameter="Year" PropertyName="Year" />
</Time>
<Message Text="Version: $(AssemblyInformationalVersion)"/>
<AssemblyInfo CodeLanguage="CS"
OutputFile="$(SourceFolder)\LoreSoft.Calculator\Properties\AssemblyInfo.cs"
AssemblyTitle="Calculator.NET"
AssemblyProduct="Calculator.NET"
AssemblyDescription="Calculator that can parse math expression."
AssemblyCompany="LoreSoft"
AssemblyCopyright="Copyright © $(Year) Paul Welter"
Guid="43484513-ed81-4a9f-8de4-be3abfe106b0"
ComVisible="false"
CLSCompliant="true"
AssemblyConfiguration="$(BuildConfiguration)"
AssemblyVersion="$(AssemblyVersion)"
AssemblyFileVersion="$(AssemblyFileVersion)"
AssemblyInformationalVersion="$(AssemblyInformationalVersion)"
GenerateClass="true" />
<AssemblyInfo CodeLanguage="CS"
OutputFile="$(SourceFolder)\LoreSoft.MathExpressions\Properties\AssemblyInfo.cs"
AssemblyTitle="LoreSoft.MathExpressions"
AssemblyProduct="LoreSoft.MathExpressions"
AssemblyDescription="Math Expression Parser."
AssemblyCompany="LoreSoft"
AssemblyCopyright="Copyright © $(Year) Paul Welter"
Guid="348985f4-3fcf-4ec3-b207-6f09e918b297"
ComVisible="false"
CLSCompliant="true"
AssemblyConfiguration="$(BuildConfiguration)"
AssemblyVersion="$(AssemblyVersion)"
AssemblyFileVersion="$(AssemblyFileVersion)"
AssemblyInformationalVersion="$(AssemblyInformationalVersion)"
GenerateClass="true" />
</Target>
<Target Name="Compile" DependsOnTargets="Clean;Version">
<MSBuild Projects="$(SourceFolder)\Calculator.sln"
Properties="Configuration=$(BuildConfiguration)"/>
</Target>
<Target Name="Test" DependsOnTargets="Compile">
<ItemGroup>
<TestAssemblies Include="$(SourceFolder)\**\*.Tests\bin\$(BuildConfiguration)\*.Tests.dll"/>
</ItemGroup>
<Message Text="AppVeyor: $(APPVEYOR)"/>
<exec Condition=" '$(APPVEYOR)' != '' "
Command="nunit-console.exe "%(TestAssemblies.Identity)""/>
<exec Condition=" '$(APPVEYOR)' == '' "
Command="$(ToolFolder)\NUnit.Runners\tools\nunit-console.exe "%(TestAssemblies.Identity)""/>
</Target>
<Target Name="Package" DependsOnTargets="Compile">
<MakeDir Directories="$(PackageFolder)" />
<ItemGroup>
<PackageFiles Include="$(BuildFolder)\*.*" />
</ItemGroup>
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(PackageFolder)"/>
<Copy SourceFiles="Documentation\Help\MathExpressions.chm" DestinationFolder="$(PackageFolder)"/>
</Target>
<Target Name="Zip" DependsOnTargets="Package">
<ItemGroup>
<ZipFiles Include="$(PackageFolder)\*.*" />
</ItemGroup>
<Zip Files="@(ZipFiles)"
WorkingDirectory="$(PackageFolder)"
ZipFileName="Calculator.v$(PackageVersion).zip" />
</Target>
<Target Name="Installer" DependsOnTargets="Package">
<MSBuild Projects="$(SourceFolder)\LoreSoft.Calculator.Setup\Calculator.sln"
Properties="Configuration=$(BuildConfiguration);PackageDir=$(PackageFolder);PackageVersion=$(InstallVersion)"/>
<Copy SourceFiles="$(SourceFolder)\LoreSoft.Calculator.Setup\bin\$(BuildConfiguration)\Calculator.msi"
DestinationFiles="Calculator.v$(PackageVersion).msi" />
</Target>
<Target Name="Pack" DependsOnTargets="Version">
<FileUpdate Files="Deploy\chocolateyInstall.ps1"
Regex="(\d+)\.(\d+)\.(\d+)\.(\d+)"
ReplacementText="$(PackageVersion)" />
<NuGetPack File="Deploy\Calculator.Net.nuspec"
OutputDirectory="$(MSBuildProjectDirectory)"
Version="$(PackageVersion)" />
</Target>
<Target Name="Build" DependsOnTargets="Test;Zip;Installer;Pack">
</Target>
</Project>