-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.build
755 lines (565 loc) · 23.8 KB
/
app.build
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
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
<?xml version="1.0"?>
<project name="Build-Release" basedir=".." default="help">
<property name="sln.dir" value="${path::combine('.', sln.name)}" />
<property name="sln.properties.file" value="${path::combine(sln.dir, sln.name + '.properties')}" overwrite="false" />
<property name="sln.version.file" value="${path::combine(sln.dir, 'version.properties')}" overwrite="false" />
<property name="sln.readme.file" value="${path::combine(sln.dir, 'README.md')}" overwrite="false" />
<property name="sln.archive.dir" value="${path::combine(sln.dir, '.archive/')}" overwrite="false" />
<property name="releases.dir" value="${path::combine('.', 'releases')}" overwrite="false" />
<property name="build.devenv" value="mdtool" overwrite="false" />
<property name="build.configuration" value="Release" overwrite="false" />
<property name="test.skip" value="false" overwrite="false" />
<script language="C#">
<code>
<![CDATA[
public static void ScriptMain(Project project) {
project.Properties["build.year"] = DateTime.Now.Year.ToString();
}
]]>
</code>
</script>
<script language="C#" prefix="timski" >
<code>
<![CDATA[
[Function("substring-from-last-char")]
public static string SubstringFromChar(string input, char ch)
{
// add 1 to skip the char itself
int index = input.LastIndexOf(ch) + 1;
if (index > 0)
return input.Substring(index, input.Length - index);
else
return null;
}
]]>
</code>
</script>
<script language="C#" prefix="timski" >
<code>
<![CDATA[
[Function("substring-to-last-char")]
public static string SubstringToChar(string input, char ch)
{
//add 1 to skip the char itself
int index = input.LastIndexOf(ch);
if (index > 0)
return input.Substring(0, index);
else
return null;
}
]]>
</code>
</script>
<script language="C#" prefix="timski" >
<code>
<![CDATA[
[Function("boolean-prompt")]
public static string BooleanPrompt(string message)
{
Console.WriteLine(message + " (y or n)");
string input = Console.ReadLine();
input.Trim();
if (input == "y" || input == "n" || input == "Y" || input == "N")
return input;
else
return BooleanPrompt(message + " (y or n)");
}
]]>
</code>
</script>
<!--
init: Load external tasks
-->
<target
name="init"
description=" [internal] Loads nant property file and external tasks."
unless="${target::has-executed('init')}" >
<loadtasks assembly="BuildScripts/lib/XmlListTask.dll" />
<property name="sln.initialized" value="true" />
</target>
<!--
help: help screen
-->
<target name="help" description="Additional information about this script. Includes usage.">
<echo/>
<echo>Usage:</echo>
<echo/>
<echo> nant -buildfile:app.build help</echo>
<echo> nant -buildfile:app.build clean</echo>
<echo> nant -buildfile:app.build compile</echo>
<echo> nant -buildfile:app.build test</echo>
<echo> nant -buildfile:app.build dist</echo>
<echo> nant -buildfile:app.build zip</echo>
<echo/>
<echo>You must also specify the project name using '-D:sln.name={solution name}' after the target.</echo>
<echo/>
<echo/>
<echo>Relevant target descriptions:</echo>
<echo/>
<echo> help: Prints this usage dialogue.</echo>
<echo/>
<echo> clean: Cleans dist directory and IDE build directory.</echo>
<echo> wipe: Completely empties dist directory and IDE build directory.</echo>
<echo/>
<echo> dist: Compiles the solution.</echo>
<echo> test: Compiles and tests the solution.</echo>
<echo> dist: Compiles, tests, and creates a distribution of the solution.</echo>
<echo> zip: Runs dist then zips up what it spits out.</echo>
<echo/>
<echo/>
<echo>Type `nant -buildfile:app.build -projecthelp' to list all defined targets."</echo>
<echo/>
</target>
<!--
validate
desc: validate/process properties files
depends: init
calls: readjavaprops
-->
<target
name="validate"
description=" [internal] Validates the setup and configuration of the solution."
depends="init"
unless="${target::has-executed('validate')}" >
<echo>Running validation on archive setup...</echo>
<fail message="Required property 'sln.name' not defined on command line." unless="${property::exists('sln.name')}" />
<fail message="Solution directory does not exist: ${sln.dir}" unless="${directory::exists(sln.dir)}" />
<fail message="Readme file '${sln.readme.file}' not found." unless="${file::exists(sln.readme.file)}" />
<fail message="Properties file '${sln.properties.file}' not found." unless="${file::exists(sln.properties.file)}"/>
<!--
Read project properties file
-->
<property name="properties.file" value="${sln.properties.file}" />
<call target="readjavaprops" />
<echo>Validating '${properties.file}'...</echo>
<fail message="Required property 'sln.desc' not found in '${sln.properties.file}'." unless="${property::exists('sln.desc')}"/>
<echo>Done.</echo>
<!--
Parse project version file
-->
<property name="properties.file" value="${sln.version.file}" />
<call target="readjavaprops" />
<echo>Validating '${properties.file}'...</echo>
<fail unless="${property::exists('sln.version')}" message="Required property 'sln.version' not set." />
<!-- try to match the supplied version against the semver regex, and parse out the root/prerelease parts -->
<regex pattern="^(?'versioncheck'(?'versionpart'\d+\.\d+\.\d+)-?(?'prereleasepart'[0-9a-zA-Z\-]+)?)$" input="${sln.version}" failonerror="false" />
<fail unless="${property::exists('versioncheck')}" message="Supplied value of sln.version (${sln.version}) does not match semvar format." />
<property name="build.flag.prerelease" value="${string::get-length(prereleasepart) > 0}" />
<property name="proj.assemblyinfo.version" value="${versionpart}" />
<echo>Done.</echo>
<echo />
<!--
Parse cs project file
-->
<foreach item="Folder" in="${sln.dir}" property="proj.dir">
<property name="proj.dir.name" value="${timski::substring-from-last-char(proj.dir, '/')}" />
<property name="proj.csproj.file" value="${proj.dir}/${proj.dir.name}.csproj" />
<if test="${file::exists(proj.csproj.file)}">
<echo message="Project: ${proj.dir.name}" />
<xmllist
file="${proj.csproj.file}"
property="event.postbuild"
delim=","
xpath="/x:Project/x:PropertyGroup/x:PostBuildEvent">
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmllist>
<foreach item="String" property="event.postbuild.part" delim="," in="${event.postbuild}">
<echo> event.postbuild: ${event.postbuild.part} </echo>
</foreach>
</if>
</foreach>
<property name="sln.file" value="${path::combine(sln.dir, sln.name + '.sln')}" />
<property name="sln.log.dir" value="${path::combine(sln.dir, 'log')}" />
<property name="build.dist.dir" value="${sln.dir}/dist-${sln.version}"/>
<mkdir dir="${sln.log.dir}" />
<echo/>
<echo/>
<echo>Solution:</echo>
<echo/>
<echo> sln.name: ${sln.name} </echo>
<echo> sln.desc: ${sln.desc} </echo>
<echo> sln.version: ${sln.version} </echo>
<echo> sln.log.dir: ${sln.log.dir} </echo>
<echo> sln.dir: ${sln.dir} </echo>
<echo> sln.file: ${sln.file} </echo>
<echo/>
<echo> build.configuration: ${build.configuration} </echo>
<echo> build.year: ${build.year} </echo>
<echo> build.dist.dir: ${build.dist.dir} </echo>
<echo/>
<echo> releases.dir: ${releases.dir} </echo>
<echo/>
<echo/>
<echo message="DONE: VALIDATE" />
<property name="sln.validated" value="true" />
</target>
<!--
readjavaprops: read properties.file
-->
<target name="readjavaprops" description=" [internal] Reads ant-style property files.">
<echo>Parsing '${properties.file}'...</echo>
<!-- requires that ${properties.file} is defined -->
<fail
message="properties.file must be defined to invoke this target"
unless="${property::exists('properties.file')}"
/>
<!-- read in the (Java) properties file -->
<foreach item="Line" in="${properties.file}" delim="=" property="name,value">
<!-- skip comments -->
<if test="${not string::starts-with(string::trim-start(name),'#')}">
<!-- skip empty lines -->
<if test="${string::get-length(string::trim(name)) > 0}">
<property name="${name}" value="${value}" />
</if>
</if>
</foreach>
</target>
<!--
wipe
desc: Completely empty intermediate/output/dist directories.
depends: validate
calls: clean
-->
<target name="wipe" depends="validate" description="Completely empties all build locations.">
<property name="clean.wipe" value="true" />
<call target="clean" />
</target>
<!--
clean
desc: Clean intermediate/output/dist directories.
depends: validate
-->
<target name="clean" depends="validate" description="Cleans all build locations.">
<echo/>
<echo/>
<echo>Cleaning log directory: ${sln.log.dir}</echo>
<delete includeemptydirs="true" verbose="true" failonerror="false">
<fileset basedir="${sln.log.dir}">
<include name="**/*" />
</fileset>
</delete>
<echo>Deleting old distribution directories...</echo>
<foreach item="Folder" in="${sln.dir}" property="foldername">
<property name="old.dist" value="${timski::substring-from-last-char(foldername, '/')}" />
<if test="${string::starts-with(old.dist, 'dist-')}">
<echo message="Deleting folder: ${foldername}" />
<delete dir="${foldername}" />
</if>
</foreach>
<echo>Done.</echo>
<echo/>
<echo/>
<foreach item="Folder" in="${sln.dir}" property="proj.dir">
<property name="proj.dir.name" value="${timski::substring-from-last-char(proj.dir, '/')}" />
<property name="proj.csproj.file" value="${proj.dir}/${proj.dir.name}.csproj" />
<if test="${file::exists(proj.csproj.file)}">
<xmllist
file="${proj.csproj.file}"
property="proj.name"
xpath="/x:Project/x:PropertyGroup/x:AssemblyName">
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmllist>
<xmllist
file="${proj.csproj.file}"
property="proj.type"
xpath="/x:Project/x:PropertyGroup/x:OutputType">
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmllist>
<echo>Cleaning sub-project: ${proj.name}</echo>
<property name="proj.int.dir" value="${proj.dir}/obj/${build.configuration}" />
<property name="proj.out.dir" value="${proj.dir}/bin/${build.configuration}" />
<property name="proj.target.name" value="${proj.name}.dll" if="${proj.type == 'Library'}" />
<property name="proj.target.name" value="${proj.name}.exe" if="${proj.type == 'Exe'}" />
<echo>Cleaning intermediate directory: ${proj.int.dir}</echo>
<delete includeemptydirs="true" verbose="true" failonerror="false">
<fileset basedir="${proj.int.dir}">
<include name="**/*" />
</fileset>
</delete>
<echo>Cleaning target directory: ${proj.out.dir}</echo>
<delete verbose="true" failonerror="false">
<fileset basedir="${proj.out.dir}">
<include name="${proj.target.name}" />
<include name="**/*" if="${property::exists('clean.wipe')}" />
</fileset>
</delete>
<echo>Done.</echo>
<echo/>
<echo/>
</if>
</foreach>
<echo>DONE: CLEAN</echo>
</target>
<!--
asminfo: builds AssemblyInfo.cs for each project.
-->
<target name="asminfo" description=" [internal] Builds AssemblyInfo.cs for each project in the solution.">
<echo>Building AssemblyInfo.cs property file for each project...</echo>
<foreach item="Folder" in="${sln.dir}" property="proj.dir">
<property name="proj.properties.file" value="${path::combine(proj.dir, 'project.properties')}" />
<if test="${file::exists(proj.properties.file)}">
<echo/>
<echo> Project properties file: ${proj.properties.file}</echo>
<!--
Parse lib properties file TODO: this will not validate after the first one since properties will have been set already
-->
<property name="properties.file" value="${proj.properties.file}" />
<call target="readjavaprops" />
<echo>Validating '${properties.file}'...</echo>
<fail message="Property 'proj.desc' not found in '${proj.properties.file}'." unless="${property::exists('proj.desc')}"/>
<!--fail message="Property 'proj.strong.name.key' not found in '${proj.properties.file}'." unless="${property::exists('proj.strong.name.key')}"/-->
<property name="proj.name" value="${path::get-file-name(proj.dir)}" />
<property name="proj.asminfo.file" value="${path::combine(path::combine(proj.dir, 'Properties'), 'AssemblyInfo.cs')}" />
<echo/>
<echo> proj.name: ${proj.name}</echo>
<echo> proj.desc: ${proj.desc}</echo>
<echo> proj.asminfo.file: ${proj.asminfo.file}</echo>
<if test="${property::exists('proj.strong.name.key')}">
<echo>proj.strong.name.key: ${proj.strong.name.key}</echo>
</if>
<echo/>
<echo/>
<!--
<fail message="File does not exist: '${proj.asminfo.file}'" unless="${file::exists(proj.asminfo.file)}" />
-->
<asminfo output="${proj.asminfo.file}" language="CSharp">
<imports>
<import namespace="System"/>
<import namespace="System.Reflection"/>
<import namespace="System.Runtime.CompilerServices"/>
</imports>
<attributes>
<attribute type="AssemblyTitleAttribute" value="${proj.name}" />
<attribute type="AssemblyDescriptionAttribute" value="${proj.desc}" />
<attribute type="AssemblyConfigurationAttribute" value="" />
<attribute type="AssemblyCompanyAttribute" value="Midnight Computers" />
<attribute type="AssemblyProductAttribute" value="${proj.desc}" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (c) ${build.year}, Midnight Computers" />
<attribute type="AssemblyTrademarkAttribute" value="" />
<attribute type="AssemblyCultureAttribute" value="" />
<attribute type="AssemblyVersionAttribute" value="$proj.assemblyinfo.version}" />
<attribute type="AssemblyDelaySignAttribute" value="false" asis="false" />
<if test="${property::exists('proj.strong.name.key')}">
<attribute type="AssemblyKeyFileAttribute" value="${proj.strong.name.key}" />
</if>
<attribute type="AssemblyKeyNameAttribute" value="" />
</attributes>
</asminfo>
</if>
</foreach>
<echo/>
<echo/>
<echo>DONE: ASMINFO</echo>
</target>
<!--
compile: Compiles the application
calls: [asminfo], [rcinfo]
-->
<target name="compile" depends="validate" description=" [internal] Compiles the application; runs assembly/resource info targets.">
<!--
Generate AssemblyInfo.cs for c# projects
-->
<call target="asminfo" />
<property name="build.log" value="${path::combine(sln.log.dir, 'devenv.log')}" />
<delete file="${build.log}" />
<property name="build.cmdline" value="build ${sln.file} -c:${build.configuration} -t:Build" />
<echo/>
<echo/>
<echo> Dev Environment: ${build.devenv}</echo>
<echo> Command Line: ${build.cmdline}</echo>
<echo/>
<echo> Solution File: ${sln.file} </echo>
<echo> ^^ Exists: ${file::exists(sln.file)}</echo>
<echo/>
<echo/>
<fail if="${not file::exists(sln.file)}" message="Solution file doesn't exist: '${sln.file}'" />
<exec
verbose="true"
program="${build.devenv}"
commandline="${build.cmdline}"
failonerror="false"
resultproperty="build.result"
/>
<echo> build.result: ${build.result}</echo>
<fail if="${int::parse(build.result) != 0}" message="The DEVENV compilation failed. Check ${build.log} for details." />
<echo/>
<echo/>
<echo>DONE: COMPILE</echo>
</target>
<!--
test
desc: Runs unit tests for the project (if available)
depends: compile
-->
<target name="test" depends="compile" description="Runs unit tests for the project (if available)." unless="${test.skip}">
<property name="nunit.file" value="${path::combine(sln.dir, sln.name + '.' + build.configuration + '.nunit')}"/>
<echo> nunit.file: ${nunit.file}</echo>
<echo> ^^ exists: ${file::exists(nunit.file)}</echo>
<if test="${file::exists(nunit.file)}">
<!-- <property name="nunit.log.out" value="${path::combine(sln.log.dir, 'TestResult.txt')}" /> -->
<!-- -out:${nunit.log.out} -->
<property name="nunit.log.xml" value="${path::combine(sln.log.dir, 'TestResult.xml')}" />
<property name="nunit.cmdline" value="${nunit.file} -labels -nodots -xml:${nunit.log.xml}"/>
<echo/>
<echo/>
<echo> Command Line: ${nunit.cmdline}</echo>
<echo/>
<echo/>
<exec
verbose="true"
program="nunit-console"
commandline="${nunit.cmdline}"
failonerror="true" />
</if>
</target>
<!--
dist
desc: Build distribution for the application depends: test
depends: test
-->
<target name="dist" depends="test" description="Builds a distribution for the application." >
<!-- make directory for distribution -->
<mkdir dir="${build.dist.dir}" />
<foreach item="Folder" in="${sln.dir}" property="proj.dir">
<property name="proj.dir.name" value="${timski::substring-from-last-char(proj.dir, '/')}" />
<property name="proj.csproj.file" value="${proj.dir}/${proj.dir.name}.csproj" />
<if test="${file::exists(proj.csproj.file)}">
<xmllist
file="${proj.csproj.file}"
property="proj.name"
xpath="/x:Project/x:PropertyGroup/x:AssemblyName">
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmllist>
<xmllist
file="${proj.csproj.file}"
property="proj.type"
xpath="/x:Project/x:PropertyGroup/x:OutputType">
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmllist>
<property name="proj.out.dir" value="${proj.dir}/bin/${build.configuration}" />
<echo> Copy files from: '${proj.out.dir}'</echo>
<property name="proj.target.name" value="${proj.name}.dll" if="${proj.type == 'Library'}" />
<property name="proj.target.name" value="${proj.name}.exe" if="${proj.type == 'Exe'}" />
<copy todir="${build.dist.dir}" flatten="true">
<fileset basedir="${proj.out.dir}">
<include name="**/*.exe" />
<include name="**/*.dll" />
<include name="**/*.exe.config" />
<exclude name="**/UnitTests.dll" />
<exclude name="**/nunit.framework.dll" />
<exclude name="**/*vshost.exe" />
<exclude name="**/*vshost.exe.config" />
</fileset>
</copy>
<echo>Done.</echo>
<echo/>
<echo/>
</if>
</foreach>
<!-- Copy other files -->
<foreach item="String" in="resources,docs,other" delim="," property="other.folder">
<if test="${directory::exists(other.folder)}">
<echo>${path::get-full-path(other.folder)}</echo>
<mkdir dir="${build.dist.dir}/${other.folder}" />
<copy todir="${build.dist.dir}/${other.folder}" flatten="false">
<fileset basedir="${other.folder}">
<include name="**/*" />
</fileset>
</copy>
</if>
</foreach>
<!-- copy the readme file -->
<copy
tofile="${build.dist.dir}/${path::get-file-name(sln.readme.file)}"
file="${sln.readme.file}"
overwrite="true" />
<!-- custom dist steps -->
<property name="dist.custom.build.file" value="${sln.dir}/custom-dist.build" />
<property name="dist.custom.build.exists" value="${file::exists(dist.custom.build.file)}" />
<nant
buildfile="${dist.custom.build.file}"
target="custom"
if="${file::exists(dist.custom.build.file)}"
/>
<echo/>
<echo/>
<echo>DONE: DIST</echo>
</target>
<!--
zip
desc: zip up the distribution from dist
depends: dist
-->
<target name="zip" depends="dist" description="Builds a zipped distribution for the application.">
<property name="sln.zip.file" value="${path::combine(build.dist.dir, sln.name + '.zip')}" />
<zip zipfile="${sln.zip.file}" includeemptydirs="true" >
<fileset basedir="${build.dist.dir}">
<include name="**/*" />
</fileset>
</zip>
<delete includeemptydirs="true">
<fileset basedir="${build.dist.dir}" >
<include name="**/*" />
<exclude name="*.zip" />
</fileset>
</delete>
<echo/>
<echo/>
<echo>DONE: ZIP</echo>
</target>
<!--
archive
desc: Archives the project.
depends: clean
-->
<target name="archive" depends="clean" description=" [Internal] Archives the solution." >
<if test="${not directory::exists(sln.archive.dir)}">
<mkdir dir="${sln.archive.dir}" />
</if>
<property name="sln.archive.file" value="${sln.archive.dir}/${sln.name}-${sln.version}.zip" />
<zip zipfile="${sln.archive.file}" includeemptydirs="true" >
<fileset basedir="${sln.dir}">
<include name="**" />
<exclude name="**/.archive/**" />
</fileset>
</zip>
<echo/>
<echo/>
<echo>DONE: ARCHIVE</echo>
</target>
<!--
release
desc: Releases the build artifacts of the solution (dll, exe, exe.config) to the configured directory.
depends: dist
-->
<target name="release" depends="dist" description=" [Internal] Releases the solution build artifacts." >
<copy todir="${releases.dir}" overwrite="true">
<fileset basedir="${build.dist.dir}" >
<include name="*.exe" />
<include name="*.exe.config" />
<include name="*.dll" />
</fileset>
</copy>
<!-- custom release steps -->
<property name="release.custom.build.file" value="${sln.dir}/custom-release.build" />
<property name="release.custom.build.exists" value="${file::exists(release.custom.build.file)}" />
<nant
buildfile="${release.custom.build.file}"
target="custom"
if="${file::exists(release.custom.build.file)}"
/>
<echo/>
<echo/>
<echo>DONE: RELEASE</echo>
</target>
</project>