-
Notifications
You must be signed in to change notification settings - Fork 272
/
Master.proj
157 lines (126 loc) · 6.38 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildFolder>$(MSBuildProjectDirectory)\Build</BuildFolder>
<ToolFolder>$(MSBuildProjectDirectory)\Tools</ToolFolder>
<SourceFolder>$(MSBuildProjectDirectory)\Source</SourceFolder>
<MSBuildCommunityTasksPath>$(ToolFolder)\MSBuildTasks\tools</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets"/>
<Import Project="$(ToolFolder)\ILRepack.MSBuild.Task\build\ILRepack.MSBuild.Task.targets"/>
<PropertyGroup>
<BuildNumber Condition=" '$(APPVEYOR_BUILD_NUMBER)' != '' ">$(APPVEYOR_BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition=" '$(BUILD_NUMBER)' != '' ">$(BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
<BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Release</BuildConfiguration>
<Major Condition=" '$(Major)' == '' ">1</Major>
<Minor Condition=" '$(Minor)' == '' ">5</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>
</PropertyGroup>
<Target Name="Clean">
<ItemGroup>
<RemoveFiles Include="$(BuildFolder)\*.*"/>
<RemoveFiles Include="$(MSBuildProjectDirectory)\*.zip"/>
<RemoveFiles Include="$(MSBuildProjectDirectory)\*.msi"/>
<RemoveFiles Include="$(MSBuildProjectDirectory)\*.nupkg"/>
<RemoveFiles Include="$(SourceFolder)\**\bin\*.*"/>
<RemoveFiles Include="$(SourceFolder)\**\obj\**\*.*"/>
</ItemGroup>
<Delete Files="@(RemoveFiles)" />
</Target>
<Target Name="Version">
<Time>
<Output TaskParameter="Year" PropertyName="Year" />
</Time>
<Message Text="AssemblyVersion: $(AssemblyVersion)"/>
<Message Text="AssemblyFileVersion: $(AssemblyFileVersion)"/>
<Message Text="PackageVersion: $(PackageVersion)"/>
<AssemblyInfo CodeLanguage="CS"
OutputFile="$(SourceFolder)\GlobalAssemblyInfo.cs"
GenerateClass="true"
AssemblyProduct="MSBuild.Community.Tasks"
AssemblyCompany="https://github.com/loresoft/msbuildtasks/"
AssemblyCopyright="Copyright © $(Year) MSBuild Community Tasks Project"
AssemblyConfiguration="$(BuildConfiguration)"
AssemblyVersion="$(AssemblyVersion)"
AssemblyFileVersion="$(AssemblyFileVersion)"
AssemblyInformationalVersion="$(AssemblyInformationalVersion)"
ComVisible="false"
CLSCompliant="false" />
</Target>
<Target Name="Compile" DependsOnTargets="Clean;Version">
<MSBuild Projects="$(SourceFolder)\MSBuild.Community.Tasks.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="Tools\NUnit.Runners\tools\nunit-console.exe "%(TestAssemblies.Identity)""/>
</Target>
<Target Name="Merge" DependsOnTargets="Compile">
<Copy SourceFiles="$(BuildFolder)\MSBuild.Community.Tasks.dll"
DestinationFiles="$(BuildFolder)\MSBuild.Temp.dll" />
<!-- Merge together files -->
<ItemGroup>
<InputAssemblies Include="$(BuildFolder)\MSBuild.Temp.dll" />
<InputAssemblies Include="$(BuildFolder)\DotNetZip.dll" />
<InputAssemblies Include="$(BuildFolder)\FSharp.Core.dll" />
<InputAssemblies Include="$(BuildFolder)\FSharp.Compiler.CodeDom.dll" />
</ItemGroup>
<ItemGroup>
<LibraryPath Include="$(BuildFolder)" />
</ItemGroup>
<!-- -->
<ILRepack Internalize="true"
InputAssemblies="@(InputAssemblies)"
LibraryPath="@(LibraryPath)"
TargetKind="Dll"
KeyFile="$(SourceFolder)\MSBuild.Community.Tasks\MSBuild.Community.Tasks.snk"
OutputFile="$(BuildFolder)\MSBuild.Community.Tasks.dll" />
<!-- Cleanup unneed files -->
<ItemGroup>
<CleanupFiles Include="$(BuildFolder)\*.dll" Exclude="$(BuildFolder)\MSBuild.Community.Tasks.dll" />
<CleanupFiles Include="$(BuildFolder)\*.x*l" Exclude="$(BuildFolder)\MSBuild.Community.Tasks.xml"/>
</ItemGroup>
<Delete Files="@(CleanupFiles)" />
</Target>
<Target Name="Documentation" DependsOnTargets="Compile">
<TaskSchema Assemblies="$(BuildFolder)\MSBuild.Community.Tasks.dll"
OutputPath="Build"
CreateTaskList="false"
IgnoreMsBuildSchema="true"
Includes="Microsoft.Build.Commontypes.xsd"/>
</Target>
<Target Name="Zip" DependsOnTargets="Documentation;Merge">
<ItemGroup>
<ZipFiles Include="$(BuildFolder)\*.*" />
</ItemGroup>
<Zip Files="@(ZipFiles)"
WorkingDirectory="$(BuildFolder)"
ZipFileName="MSBuild.Community.Tasks.v$(PackageVersion).zip" />
</Target>
<Target Name="Installer" DependsOnTargets="Compile;Documentation;Merge" Condition="'$(OS)' == 'Windows_NT'">
<MSBuild Projects="$(SourceFolder)\MSBuild.Community.Tasks.Setup\MSBuildTasks.wixproj"
Properties="Configuration=Release;Major=$(Major);Minor=$(Minor);Build=$(Patch);Revision=$(BuildNumber)" />
<Copy SourceFiles="$(SourceFolder)\MSBuild.Community.Tasks.Setup\bin\Release\MSBuild.Community.Tasks.msi"
DestinationFiles="MSBuild.Community.Tasks.v$(PackageVersion).msi" />
</Target>
<Target Name="Pack" DependsOnTargets="Merge">
<NuGetPack File="MSBuildTasks.nuspec"
OutputDirectory="$(MSBuildProjectDirectory)"
Version="$(PackageVersion)"
Symbols="true" />
</Target>
<Target Name="Build" DependsOnTargets="Zip;Installer;Pack">
<Message Text="Build Complete"/>
</Target>
</Project>