-
Notifications
You must be signed in to change notification settings - Fork 1
/
nant.build
50 lines (48 loc) · 2.81 KB
/
nant.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
<?xml version="1.0"?>
<project name="Abbreviation" default="clean">
<!--<loadtasks assembly="..\work-tool\nant\extensions\common\2.0\yui\Yahoo.Yui.Compressor.Build.Nant.dll" verbose="true" />-->
<property name="runtime" value="dotnet" dynamic="true"/>
<property name="args0" value="" dynamic="true"/>
<property name="args1" value="" dynamic="true"/>
<property name="project.config" value="${args0}" dynamic="true" />
<!--path-->
<property name="dir" value="."/>
<property name="dir.tools" value="../work-tool"/>
<property name="build.base" value="build/${project.config}"/>
<property name="build.absolutepath" value="${path::get-full-path(build.base)}" />
<property name="xpath.flag" value="/configuration/appSettings/add[@key='EnvironmentVersionFlag']/@value"/>
<property name="xpath.flag_refresh" value="/configuration/appSettings/add[@key='AutoRefreshSettingsFlag']/@value"/>
<property name="xpath.compilation" value="/configuration/system.web/compilation/@debug"/>
<property name="xpath.customErrors" value="/configuration/system.web/customErrors/@mode"/>
<property name="xpath.trace" value="/configuration/system.web/trace/@enabled"/>
<!--nuget-->
<property name="nuget" value="${path::get-full-path(dir.tools)}" />
<property name="nuget.packages" value="${dir}\packages" />
<property name="nuget.cache" value="C:\Users\${environment::get-user-name()}\AppData\Local\NuGet\Cache" />
<property name="nuget.install" value="${dir}\nuget.install.bat" />
<property name="nuget.params.install" value="${nuget} ${path::get-full-path(nuget.packages)}" />
<!--msbuild-->
<property name="msbuild" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" />
<property name="msbuild.config" value="Debug" dynamic="true"/>
<if test="${project.config=='Release'}">
<property name="msbuild.config" value="Release"/>
</if>
<property name="msbuild.params" value="/t:rebuild /p:Configuration=${msbuild.config}" />
<property name="msbuild.params.weboutput" value="/t:_CopyWebApplication /p:WebProjectOutputDir=${build.absolutepath}" />
<property name="msbuild.params.mvcoutput" value="/t:_CopyWebApplication /p:mvcbuildviews=true /p:WebProjectOutputDir=${build.absolutepath}" />
<property name="msbuild.params.output" value="/p:OutputPath=${build.absolutepath}" />
<!--xbuild for mono-->
<if test="${runtime=='mono'}">
<!--windows use xbuild.bat-->
<property name="msbuild" value="xbuild"/>
</if>
<!--NUnit-->
<property name="nunit" value="${path::get-full-path(dir.tools)}/nunit/nunit-console.exe" />
<target name="nuget" description="nuget install and update">
<delete dir="${nuget.packages}"></delete>
<delete dir="${nuget.cache}"></delete>
<exec program="${nuget.install}"
commandline="${nuget.params.install}"
workingdir="${dir}" />
</target>
</project>