-
Notifications
You must be signed in to change notification settings - Fork 5
/
Build.proj
474 lines (348 loc) · 22.4 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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Compile" ToolsVersion="4.0">
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="Tools\Compression\MSBuild.Packer.Targets" />
<UsingTask TaskName="MSBuild.Community.Tasks.AssemblyInfo" AssemblyFile="Tools\CommunityTasks\MSBuild.Community.Tasks.dll" />
<UsingTask TaskName="MSBuild.Community.Tasks.XmlUpdate" AssemblyFile="Tools\CommunityTasks\MSBuild.Community.Tasks.dll" />
<UsingTask TaskName="MSBuild.Community.Tasks.Xslt" AssemblyFile="Tools\CommunityTasks\MSBuild.Community.Tasks.dll" />
<UsingTask TaskName="MSBuild.Community.Tasks.Zip" AssemblyFile="Tools\CommunityTasks\MSBuild.Community.Tasks.dll" />
<UsingTask TaskName="CssCompressorTask" AssemblyFile="Tools\Compression\Yahoo.Yui.Compressor.Build.MsBuild.dll" />
<UsingTask TaskName="JavaScriptCompressorTask" AssemblyFile="Tools\Compression\Yahoo.Yui.Compressor.Build.MsBuild.dll" />
<UsingTask TaskName="NUnit" AssemblyFile="Tools\CommunityTasks\MSBuild.Community.Tasks.dll" />
<UsingTask TaskName="SqlDropDatabase" AssemblyFile="Tools\SqlMsBuildTasks\SqlMsBuildTasks.dll" />
<UsingTask TaskName="XUnit.Runner.MSBuild.xunit" AssemblyFile="Tools\XUnit\xunit.runner.msbuild.dll" />
<PropertyGroup>
<!-- Assembly Stamping -->
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
<RevisionNumber Condition=" '$(RevisionNumber)' == '' ">0</RevisionNumber>
<AssemblyVersion Condition=" '$(AssemblyVersion)' == ''">1.0.0.0</AssemblyVersion>
<AssemblyFileVersion>1.0.$(BuildNumber).$(RevisionNumber)</AssemblyFileVersion>
<AssemblyInformationalVersion>1.0.$(BuildNumber).$(RevisionNumber)</AssemblyInformationalVersion>
<BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Release</BuildConfiguration>
<!-- Solution Files -->
<SolutionFileName>$(ProjectDir)Source\AngularSkeleton.sln</SolutionFileName>
<StrongNameKey>$(ProjectDir)Source\AngularSkeleton.snk</StrongNameKey>
<!-- Artifact Package Directories -->
<ArtifactRoot>$(ProjectDir)Build\Artifacts</ArtifactRoot>
<DatabaseRoot>$(ProjectDir)Database</DatabaseRoot>
<StaticOutputFolder>$(ProjectDir)Build\StaticOutput</StaticOutputFolder>
<ImporterOutputFolder>$(ProjectDir)Build\ImporterOutput</ImporterOutputFolder>
<PackageOutputFolder>$(ProjectDir)Build\PackageOutput</PackageOutputFolder>
<TestsOutputFolder>$(ProjectDir)Build\TestsOutput</TestsOutputFolder>
<WebOutputFolder>$(ProjectDir)Build\WebOutput</WebOutputFolder>
<WebApplicationOutputFolder>$(WebOutputFolder)\Application</WebApplicationOutputFolder>
<!-- App Settings -->
<ApplicationUrl>$(ApplicationUrl)</ApplicationUrl>
<!-- Web Publish Paths -->
<ReleaseArtifactsPath>$(ProjectDir)Release</ReleaseArtifactsPath>
<ReleaseDatabasePath>$(ReleaseArtifactsPath)\Database</ReleaseDatabasePath>
<ReleaseWebApplicationPath>$(WebApplicationOutputFolder)\_PublishedWebSites\AngularSkeleton.Web.Application\</ReleaseWebApplicationPath>
<!-- Web Deployment Share -->
<WebDeployTempDriveLetter Condition="'$(WebDeployTempDriveLetter)' == ''">T</WebDeployTempDriveLetter>
<WebDeployNetworkShare>$(WebDeployNetworkShare)</WebDeployNetworkShare>
<WebDeployPath>$(WebDeployPath)</WebDeployPath>
<!-- Database -->
<DatabaseRoot>$(ProjectDir)Database</DatabaseRoot>
<DatabaseTimeout Condition="'$(DatabaseTimeout)' == ''">1800000</DatabaseTimeout>
<DatabaseServer Condition="'$(DatabaseServer)' == ''">CPT-SERVER</DatabaseServer>
<DatabaseName Condition="'$(DatabaseName)' == ''">AIDO_ENVOICE_BUILD</DatabaseName>
<DatabaseUsername Condition="'$(DatabaseUsername)' == ''">bamboobuild</DatabaseUsername>
<DatabasePassword Condition="'$(DatabasePassword)' == ''">p@ssw0rd</DatabasePassword>
<!-- NuGet -->
<NuGetExecutable>$(ProjectDir)Tools\NuGet\NuGet.exe</NuGetExecutable>
<!-- Client cdn -->
<DisableCdnClient>false</DisableCdnClient>
<!-- XUnit to NUnit transformation -->
<XUnitTransformationXsl>$(ProjectDir)Tools\XUnit\nunitxml.xslt</XUnitTransformationXsl>
</PropertyGroup>
<Target Name="Clean">
<Message Text="**********************************************" />
<Message Text="Cleaning Solution" />
<Message Text="**********************************************" />
<MSBuild Projects="$(SolutionFileName)" Properties="Configuration=$(BuildConfiguration)" Targets="Clean" />
<ItemGroup>
<BinFiles Include="bin\*.*" />
</ItemGroup>
<Delete Files="@(BinFiles)" />
<RemoveDir Directories="$(ArtifactRoot)" ContinueOnError="true" />
<RemoveDir Directories="$(TestsOutputFolder)" ContinueOnError="true" />
<RemoveDir Directories="$(WebApplicationOutputFolder)" ContinueOnError="true" />
<RemoveDir Directories="$(WebMarketingOutputFolder)" ContinueOnError="true" />
</Target>
<Target Name="StampVersionInfo">
<Message Text="**********************************************" />
<Message Text="Stamping Assemblies with Version $(AssemblyVersion), FileVersion $(AssemblyFileVersion)" />
<Message Text="**********************************************" />
<AssemblyInfo CodeLanguage="CS" OutputFile="$(ProjectDir)Source\Aido.Envoice.Common\Properties\VersionInfo.cs" AssemblyVersion="$(AssemblyVersion)" AssemblyFileVersion="$(AssemblyFileVersion)" AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
<AssemblyInfo CodeLanguage="CS" OutputFile="$(ProjectDir)Source\Aido.Envoice.Domain\Properties\VersionInfo.cs" AssemblyVersion="$(AssemblyVersion)" AssemblyFileVersion="$(AssemblyFileVersion)" AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
<AssemblyInfo CodeLanguage="CS" OutputFile="$(ProjectDir)Source\Aido.Envoice.Web.Application\Properties\VersionInfo.cs" AssemblyVersion="$(AssemblyVersion)" AssemblyFileVersion="$(AssemblyFileVersion)" AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
<AssemblyInfo CodeLanguage="CS" OutputFile="$(ProjectDir)Source\Aido.Envoice.Web.Common\Properties\VersionInfo.cs" AssemblyVersion="$(AssemblyVersion)" AssemblyFileVersion="$(AssemblyFileVersion)" AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
<AssemblyInfo CodeLanguage="CS" OutputFile="$(ProjectDir)Source\Aido.Envoice.Web.Marketing\Properties\VersionInfo.cs" AssemblyVersion="$(AssemblyVersion)" AssemblyFileVersion="$(AssemblyFileVersion)" AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
</Target>
<Target Name="NugetRestorePackages">
<Message Text="**********************************************" />
<Message Text="Restoring Nuget Packages" />
<Message Text="**********************************************" />
<Exec Command="$(NuGetExecutable) restore $(SolutionFileName)" WorkingDirectory="$(ProjectDir)Tools\NuGet\" />
</Target>
<Target Name="Compile" DependsOnTargets="Clean;StampVersionInfo;NugetRestorePackages;">
<Message Text="**********************************************" />
<Message Text="Compile" />
<Message Text="**********************************************" />
<Message Text="Building Application" />
<MSBuild Projects="$(SolutionFileName)" Properties="Configuration=$(BuildConfiguration)" />
</Target>
<Target Name="MigrateDatabase">
<Message Text="****************************************************" />
<Message Text="Dropping Database $(DatabaseName) (if exists)" />
<Message Text="****************************************************" />
<SqlDropDatabase ConnectionString="Data Source=$(DatabaseServer);User Id=$(DatabaseUsername);Password=$(DatabasePassword);"
Database="$(DatabaseName)" />
<Message Text="****************************************************" />
<Message Text="Migrating Database $(DatabaseName)" />
<Message Text="****************************************************" />
<PropertyGroup>
<MigrateExecutable>$(ProjectDir)\Source\Packages\EntityFramework.6.1.0\tools\migrate.exe</MigrateExecutable>
<MigrateStartupDirectory>$(ProjectDir)\Source\Aido.Envoice.Web.Application\bin</MigrateStartupDirectory>
<MigrateStartupConfigurationFile>$(ProjectDir)\Source\Aido.Envoice.Web.Application\Web.config</MigrateStartupConfigurationFile>
</PropertyGroup>
<Message Text="Using $(MigrateStartupConfigurationFile)" />
<Message Text="Using Data Source=$(DatabaseServer);User Id=$(DatabaseUsername);Password=$(DatabasePassword);Initial Catalog=$(DatabaseName);Connection Timeout=30;MultipleActiveResultSets=True;" />
<XmlUpdate
Namespace="http://schemas.microsoft.com/.NetConfiguration/v2.0"
XmlFileName="$(MigrateStartupConfigurationFile)"
Xpath="//connectionStrings/add[@name='AIDO_ENVOICE']/@connectionString"
Value="Data Source=$(DatabaseServer);User Id=$(DatabaseUsername);Password=$(DatabasePassword);Initial Catalog=$(DatabaseName);Connection Timeout=30;MultipleActiveResultSets=True;"
/>
<Exec Command="$(MigrateExecutable) Aido.Envoice.Domain.dll /StartUpDirectory:$(MigrateStartupDirectory) /startupConfigurationFile:$(MigrateStartupConfigurationFile) /verbose" Timeout="$(DatabaseTimeout)" />
</Target>
<Target Name="Test" DependsOnTargets="MigrateDatabase">
<Message Text="**********************************************" />
<Message Text="Running Unit Tests" />
<Message Text="**********************************************" />
<MakeDir Directories="$(TestsOutputFolder)" ContinueOnError="true" />
<!-- DOMAIN TESTS -->
<XmlUpdate
Namespace="http://schemas.microsoft.com/.NetConfiguration/v2.0"
XmlFileName="$(ProjectDir)\Source\Aido.Envoice.Domain.Tests\bin\$(BuildConfiguration)\Aido.Envoice.Domain.Tests.dll.config"
Xpath="//connectionStrings/add[@name='AIDO_ENVOICE']/@connectionString"
Value="Data Source=$(DatabaseServer);User Id=$(DatabaseUsername);Password=$(DatabasePassword);Initial Catalog=$(DatabaseName);Connection Timeout=30;MultipleActiveResultSets=True;"
/>
<CreateItem Include="$(ProjectDir)\Source\Aido.Envoice.Domain.Tests\bin\$(BuildConfiguration)\Aido.Envoice.Domain.Tests.dll">
<Output TaskParameter="Include" ItemName="DomainTestAssemblies" />
</CreateItem>
<xunit Assemblies="@(DomainTestAssemblies)" Xml="$(TestsOutputFolder)\xunit-domain-result.xml" />
<!-- WEB APPLICATION TESTS -->
<XmlUpdate
Namespace="http://schemas.microsoft.com/.NetConfiguration/v2.0"
XmlFileName="$(ProjectDir)\Source\Aido.Envoice.Web.Application.Tests\bin\$(BuildConfiguration)\Aido.Envoice.Web.Application.Tests.dll.config"
Xpath="//connectionStrings/add[@name='AIDO_ENVOICE']/@connectionString"
Value="Data Source=$(DatabaseServer);User Id=$(DatabaseUsername);Password=$(DatabasePassword);Initial Catalog=$(DatabaseName);Connection Timeout=30;MultipleActiveResultSets=True;"
/>
<CreateItem Include="$(ProjectDir)\Source\Aido.Envoice.Web.Application.Tests\bin\$(BuildConfiguration)\Aido.Envoice.Web.Application.Tests.dll">
<Output TaskParameter="Include" ItemName="WebApplicationTestAssemblies" />
</CreateItem>
<xunit Assemblies="@(WebApplicationTestAssemblies)" Xml="$(TestsOutputFolder)\xunit-web-application-result.xml" />
<!-- TRANSFORM FOR NUNIT-->
<MSBuild.Community.Tasks.Xslt Xsl="$(XUnitTransformationXsl)" Inputs="$(TestsOutputFolder)\xunit-domain-result.xml" Output="$(TestsOutputFolder)\nunit-domain-result.xml"/>
<MSBuild.Community.Tasks.Xslt Xsl="$(XUnitTransformationXsl)" Inputs="$(TestsOutputFolder)\xunit-web-application-result.xml" Output="$(TestsOutputFolder)\nunit-web-application-result.xml"/>
</Target>
<Target Name="BuildWebOutput">
<RemoveDir Directories="$(ReleaseWebApplicationPath)" ContinueOnError="true" />
<RemoveDir Directories="$(ReleaseWebMarketingPath)" ContinueOnError="true" />
<CallTarget Targets="BuildWebApplicationOutput" />
<CallTarget Targets="BuildWebMarketingOutput" />
<!--CallTarget Targets="BuildStaticOutput" /-->
<CallTarget Targets="UpdateAppSettings" />
</Target>
<Target Name="BuildWebApplicationOutput">
<Message Text="****************************************************" />
<Message Text="Publishing Web Application to $(WebApplicationOutputFolder)" />
<Message Text="****************************************************" />
<MSBuild Projects="Source\Aido.Envoice.Web.Application\Aido.Envoice.Web.Application.csproj"
Targets="ResolveReferences;_CopyWebApplication;_BuiltWebOutputGroupOutput"
Properties="OutDir=$(WebApplicationOutputFolder)\;Configuration=$(BuildConfiguration)" />
</Target>
<Target Name="BuildWebMarketingOutput">
<Message Text="****************************************************" />
<Message Text="Publishing Web Marketing Application to $(WebMarketingOutputFolder)" />
<Message Text="****************************************************" />
<MSBuild Projects="Source\Aido.Envoice.Web.Marketing\Aido.Envoice.Web.Marketing.csproj"
Targets="ResolveReferences;_CopyWebApplication;_BuiltWebOutputGroupOutput"
Properties="OutDir=$(WebMarketingOutputFolder)\;Configuration=$(BuildConfiguration)" />
</Target>
<Target Name="BuildStaticOutput">
<Message Text="****************************************************" />
<Message Text="Building Static Output" />
<Message Text="****************************************************" />
<RemoveDir Directories="$(StaticOutputFolder)" ContinueOnError="true" />
<MakeDir Directories="$(StaticOutputFolder)" />
<MakeDir Directories="$(StaticOutputFolder)\Client" />
<MakeDir Directories="$(StaticOutputFolder)\Content" />
<Message Text="****************************************************" />
<Message Text="Minify Client Javascript and Css" />
<Message Text="****************************************************" />
<ItemGroup>
<AppScriptFiles Include="$(ReleaseWebApplicationPath)\Client\**\*.js" Exclude="$(ReleaseWebApplicationPath)\Client\Vendor\**\*.*;$(ReleaseWebApplicationPath)\Client\Loader.js" />
</ItemGroup>
<ReadLinesFromFile File="%(AppScriptFiles.Identity)">
<Output TaskParameter="Lines" ItemName="lines"/>
</ReadLinesFromFile>
<WriteLinesToFile File="$(StaticOutputFolder)\Client\Application.uncompressed.js" Lines="@(Lines)" Overwrite="true" />
<JavaScriptCompressorTask
SourceFiles="$(StaticOutputFolder)\Client\Application.uncompressed.js"
DeleteSourceFiles="true"
OutputFile="$(StaticOutputFolder)\Client\Application.js"
CompressionType="Standard"
ObfuscateJavaScript="True"
PreserveAllSemicolons="False"
DisableOptimizations="No"
EncodingType="Default"
LineBreakPosition="-1"
LoggingType="Info"
ThreadCulture="en-au"
IsEvalIgnored="false"
/>
<Message Text="****************************************************" />
<Message Text="Writing client version information" />
<Message Text="****************************************************" />
<WriteLinesToFile
File="$(StaticOutputFolder)\Client\Version.txt"
Lines="$(AssemblyFileVersion)"
Overwrite="true" />
<Message Text="****************************************************" />
<Message Text="Migrating to production script loader" />
<Message Text="****************************************************" />
<Copy SourceFiles="$(ReleaseWebApplicationPath)\Client\Loader\Production.js"
DestinationFiles="$(StaticOutputFolder)\Client\Loader.js" />
<Message Text="****************************************************" />
<Message Text="Copying vendor minified javascript" />
<Message Text="****************************************************" />
<ItemGroup>
<VendorFiles Include="$(ReleaseWebApplicationPath)\Client\Vendor\**\*.min.js" />
</ItemGroup>
<Copy SourceFiles="@(VendorFiles)" DestinationFolder="$(StaticOutputFolder)\Client\Vendor\%(RecursiveDir)" />
<Message Text="****************************************************" />
<Message Text="Copying module templates" />
<Message Text="****************************************************" />
<ItemGroup>
<ModuleTemplateFiles Include="$(ReleaseWebApplicationPath)\Client\Modules\**\*.tpl.html" />
</ItemGroup>
<Copy SourceFiles="@(ModuleTemplateFiles)" DestinationFolder="$(StaticOutputFolder)\Client\Modules\%(RecursiveDir)" />
<Message Text="****************************************************" />
<Message Text="Applying client output to web app" />
<Message Text="****************************************************" />
<ItemGroup>
<ClientToDelete Include="$(ReleaseWebApplicationPath)\Client" />
</ItemGroup>
<RemoveDir Directories="@(ClientToDelete)" />
<Message Text="****************************************************" />
<Message Text="Copying content" />
<Message Text="****************************************************" />
<ItemGroup>
<ContentFiles Include="$(ReleaseWebApplicationPath)\Content\**\*.*" Exclude="$(ReleaseWebApplicationPath)\Content\Web.config" />
<ContentToDelete Include="$(ReleaseWebApplicationPath)\Client" />
</ItemGroup>
<Copy SourceFiles="@(ContentFiles)" DestinationFolder="$(StaticOutputFolder)\Content\%(RecursiveDir)" />
<RemoveDir Directories="@(ContentToDelete)" />
<!-- DISABLE CDN -->
<ItemGroup>
<ClientToCopy Include="$(StaticOutputFolder)\**\*.*" />
</ItemGroup>
<Copy Condition="$(DisableCdnClient)" SourceFiles="@(ClientToCopy)" DestinationFolder="$(ReleaseWebApplicationPath)\Client\%(RecursiveDir)" />
</Target>
<Target Name="UpdateAppSettings">
<Message Text="****************************************************" />
<Message Text="Updating web app settings" />
<Message Text="****************************************************" />
<!-- Remove Debug -->
<XmlUpdate
XmlFileName="$(ReleaseWebApplicationPath)\Web.config"
XPath="//configuration/system.web/compilation/@debug"
Value="false" />
<XmlUpdate
XmlFileName="$(ReleaseWebMarketingPath)\Web.config"
XPath="//configuration/system.web/compilation/@debug"
Value="false" />
</Target>
<Target Name="Package">
<Message Text="" />
<Message Text="" />
<Message Text="****************************************************" />
<Message Text="Packaging Artifacts" />
<Message Text="****************************************************" />
<Message Text="" />
<RemoveDir Directories="$(ArtifactRoot)" ContinueOnError="true" />
<MakeDir Directories="$(ArtifactRoot)" />
<RemoveDir Directories="$(PackageOutputFolder)" ContinueOnError="true" />
<MakeDir Directories="$(PackageOutputFolder)" />
<MakeDir Directories="$(PackageOutputFolder)\Database" />
<MakeDir Directories="$(PackageOutputFolder)\Documentation" />
<MakeDir Directories="$(PackageOutputFolder)\Tools" />
<MakeDir Directories="$(PackageOutputFolder)\Web" />
<MakeDir Directories="$(PackageOutputFolder)\Web\Application" />
<MakeDir Directories="$(PackageOutputFolder)\Web\Static" />
<MakeDir Directories="$(PackageOutputFolder)\Web\Marketing" />
<!-- README -->
<ItemGroup>
<ReadmeFile Include="$(ProjectDir)\README.txt" />
</ItemGroup>
<Copy SourceFiles="@(ReadmeFile)" DestinationFolder="$(PackageOutputFolder)\%(RecursiveDir)" />
<!-- DEPLOYMENT FILES -->
<ItemGroup>
<DeploymentFiles Include="$(ProjectDir)\Deployment\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(DeploymentFiles)" DestinationFolder="$(PackageOutputFolder)\%(RecursiveDir)" />
<!-- DEPLOYMENT TOOLS -->
<Copy
SourceFiles="$(ProjectDir)\Source\Packages\EntityFramework.6.1.0\lib\net45\EntityFramework.dll"
DestinationFolder="$(PackageOutputFolder)\Tools" />
<Copy
SourceFiles="$(ProjectDir)\Source\Packages\EntityFramework.6.1.0\tools\migrate.exe"
DestinationFolder="$(PackageOutputFolder)\Tools" />
<Copy
SourceFiles="$(ProjectDir)\Tools\SqlMsBuildTasks\\SqlMsBuildTasks.dll"
DestinationFolder="$(PackageOutputFolder)\Tools" />
<Copy
SourceFiles="$(ProjectDir)\Tools\CommunityTasks\MSBuild.Community.Tasks.dll"
DestinationFolder="$(PackageOutputFolder)\Tools" />
<!-- DATABASE SCRIPTS -->
<Message Text="Gathering database scripts from $(DatabaseRoot)\**\*.*" />
<Copy
SourceFiles="$(WebApplicationOutputFolder)\_PublishedWebSites\Aido.Envoice.Web.Application\bin\Aido.Envoice.Domain.dll"
DestinationFolder="$(PackageOutputFolder)\Database\"/>
<!-- WEB APPLICATION -->
<Message Text="Gathering web application files" />
<ItemGroup>
<WebApplicationFiles Include="$(WebApplicationOutputFolder)\_PublishedWebSites\Aido.Envoice.Web.Application\**\*.*"
Exclude="$(WebApplicationOutputFolder)\_PublishedWebSites\Aido.Envoice.Web.Application\**\.svn\**"/>
</ItemGroup>
<Copy SourceFiles="@(WebApplicationFiles)" DestinationFolder="$(PackageOutputFolder)\Web\Application\%(RecursiveDir)" />
<!-- WEB STATIC -->
<Message Text="Gathering web static files" />
<ItemGroup>
<WebClientFiles Include="$(StaticOutputFolder)\**\*.*"/>
</ItemGroup>
<Copy
SourceFiles="@(WebClientFiles)"
DestinationFolder="$(PackageOutputFolder)\Web\Static\%(RecursiveDir)"/>
<!-- WEB MARKETING -->
<Message Text="Gathering web application files" />
<ItemGroup>
<WebMarketingFiles Include="$(WebMarketingOutputFolder)\_PublishedWebSites\Aido.Envoice.Web.Marketing\**\*.*"
Exclude="$(WebMarketingOutputFolder)\_PublishedWebSites\Aido.Envoice.Web.Marketing\**\.svn\**"/>
</ItemGroup>
<Copy SourceFiles="@(WebMarketingFiles)" DestinationFolder="$(PackageOutputFolder)\Web\Marketing\%(RecursiveDir)" />
<!-- PACKAGE ZIP -->
<Message Text="Packaging files from $(PackageOutputFolder)\**\*.*" />
<ItemGroup>
<PackageFiles Include="$(PackageOutputFolder)\**\*.*" />
</ItemGroup>
<Zip ZipFileName="$(ArtifactRoot)\Archive\AIDO-Envoice-$(AssemblyFileVersion).zip"
WorkingDirectory="$(PackageOutputFolder)"
Files="@(PackageFiles)"
ZipLevel="9" />
<!-- RAW OUTPUT -->
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(ArtifactRoot)\Output\%(RecursiveDir)" />
</Target>
</Project>