|
1 | 1 | <?xml version="1.0" ?>
|
2 | 2 | <project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
|
3 |
| - |
4 |
| - <!-- |
5 |
| - Use this to determine if the key file NHibernate.snk should be used to |
6 |
| - sign the assemblies. Defaults to true since private key is present |
7 |
| - in CVS. |
8 |
| - --> |
9 |
| - <property name="sign" value="true" overwrite="false" /> |
10 |
| - |
11 | 3 | <!--
|
12 | 4 | if Visual Studio Help Integration Kit has been installed
|
13 | 5 | then change this to true or include -D:vshik.installed=true in the command line.
|
|
22 | 14 | -->
|
23 | 15 | <property name="nunit2report.installed" value="false" overwrite="false" />
|
24 | 16 |
|
25 |
| - <property name="nant-version.current" value="${assemblyname::get-version(assembly::get-name(nant::get-assembly()))}" /> |
26 |
| - <property name="nant-version.required" value="0.91.4312.0" /> <!-- Nant 0.91 release version --> |
27 |
| - |
28 | 17 | <!-- Path to the folder that contain the external assemblies -->
|
29 | 18 | <property name="lib.dir" value="lib" dynamic="true" />
|
30 | 19 |
|
|
36 | 25 | <!-- properties used to connect to database for testing -->
|
37 | 26 | <include buildfile="nhibernate-properties.xml" />
|
38 | 27 |
|
39 |
| - <!-- named project configurations --> |
40 |
| - <target name="set-debug-project-configuration" description="Perform a 'debug' build"> |
41 |
| - <property name="build.release" value="false" /> |
42 |
| - <property name="build.debug" value="true" /> |
43 |
| - <property name="build.name" value="NHibernate-${project.version}-${project.config}" /> |
44 |
| - </target> |
45 |
| - |
46 |
| - <target name="set-release-project-configuration" description="Perform a 'release' build"> |
47 |
| - <property name="build.release" value="true" /> |
48 |
| - <property name="build.debug" value="pdbonly" /> |
49 |
| - <property name="build.name" value="NHibernate-${project.version}" /> |
50 |
| - </target> |
51 |
| - |
52 |
| - <target name="set-project-configuration"> |
| 28 | + <target name="common.init" description="Initializes build properties"> |
53 | 29 | <property name="project.config" value="debug" overwrite="false" />
|
54 |
| - <if test="${not(target::exists('set-' + project.config + '-project-configuration'))}"> |
55 |
| - <fail message="Unknown configuration: '${project.config}'" /> |
56 |
| - </if> |
57 |
| - |
58 |
| - <call target="set-${project.config}-project-configuration" /> |
59 |
| - |
| 30 | + <property name="build.name" value="NHibernate-${project.version}" if="${project.config == 'release'}"/> |
| 31 | + <property name="build.name" value="NHibernate-${project.version}-${project.config}" unless="${project.config == 'release'}" /> |
60 | 32 | <property name="build.root.dir" value="${root.dir}/build/${build.name}" />
|
61 | 33 | <property name="build.dir" value="${build.root.dir}" />
|
62 | 34 | <property name="bin.dir" value="${build.dir}/bin" />
|
63 | 35 | <property name="testresults.dir" value="${bin.dir}/test-results" />
|
64 | 36 | <property name="tools.dir" value="${root.dir}/Tools"/>
|
65 | 37 | </target>
|
66 | 38 |
|
67 |
| - <target name="display-current-runtime"> |
68 |
| - <echo message="" /> |
69 |
| - <echo message="----------------------------------------------------------" /> |
70 |
| - <echo message=" ${framework::get-description(framework::get-target-framework())}" /> |
71 |
| - <echo message="----------------------------------------------------------" /> |
72 |
| - <echo message="" /> |
73 |
| - <echo message="framework : ${framework::get-target-framework()}" /> |
74 |
| - <echo message="description : ${framework::get-description(framework::get-target-framework())}" /> |
75 |
| - <echo message="sdk directory : ${framework::get-sdk-directory(framework::get-target-framework())}" /> |
76 |
| - <echo message="framework directory : ${framework::get-framework-directory(framework::get-target-framework())}" /> |
77 |
| - <echo message="assembly directory : ${framework::get-assembly-directory(framework::get-target-framework())}" /> |
78 |
| - <echo message="runtime engine : ${framework::get-runtime-engine(framework::get-target-framework())}" /> |
79 |
| - <echo message="" /> |
| 39 | + <target name="common.download-nuget" depends="common.init"> |
| 40 | + <get |
| 41 | + src="https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" |
| 42 | + dest="${tools.dir}/nuget.exe" |
| 43 | + usetimestamp="true" |
| 44 | + /> |
80 | 45 | </target>
|
81 | 46 |
|
82 |
| - <target name="common.init" |
83 |
| - depends="set-project-configuration" |
84 |
| - description="Initializes build properties"> |
85 |
| - |
86 |
| - <fileset id="project.sources" failonempty="true"> |
87 |
| - <include name="**/*.cs" /> |
88 |
| - </fileset> |
89 |
| - <resourcefileset id="project.resources" /> |
| 47 | + <target name="common.nuget-restore" depends="common.init common.download-nuget"> |
| 48 | + <exec basedir="${tools.dir}" workingdir="${root.dir}/Tools" program="NuGet.exe"> |
| 49 | + <arg value="install" /> |
| 50 | + </exec> |
90 | 51 | </target>
|
91 | 52 |
|
92 |
| - <target name="common.get-nuget-package-path"> |
93 |
| - <xmlpeek |
94 |
| - file="${tools.dir}/packages.config" |
95 |
| - xpath="/packages/package[@id = '${nuget-package-id}']/@version" |
96 |
| - property="nuget-package-version" /> |
97 |
| - <property name="nuget-package-path" value="${tools.dir}/${nuget-package-id}.${nuget-package-version}/" /> |
98 |
| - </target> |
99 |
| - |
100 |
| - <target name="common.find-async-generator-console"> |
101 |
| - <property name="nuget-package-id" value="CSharpAsyncGenerator.CommandLine" /> |
102 |
| - <call target="common.get-nuget-package-path" /> |
103 |
| - <property name="async-generator-console" value="${nuget-package-path}/tools/AsyncGenerator.CommandLine.exe" /> |
104 |
| - </target> |
105 |
| - |
106 |
| - <target name="common.find-nunit"> |
107 |
| - <property name="nuget-package-id" value="NUnit.ConsoleRunner" /> |
108 |
| - <call target="common.get-nuget-package-path" /> |
109 |
| - <property name="nunit-console" value="${nuget-package-path}/tools/nunit3-console.exe" /> |
110 |
| - </target> |
111 |
| - |
112 |
| - <target name="common.find-ndoc"> |
113 |
| - <property name="ndoc-console" value="${tools.dir}/ndoc/NDocConsole.exe" /> |
114 |
| - </target> |
115 |
| - |
116 |
| - <target name="nuget.set-properties"> |
117 |
| - <property name="nuget.nupackages.relative-dir" value="nuget_gallery" /> |
118 |
| - |
119 |
| - <property name="nuget.nupackages.dir" value="${build.dir}/${nuget.nupackages.relative-dir}" /> |
120 |
| - <property name="nuget.nupackages.pushbatfile" value="${nuget.nupackages.dir}/NuGetPush.bat" /> |
121 |
| - </target> |
122 |
| - |
123 | 53 | </project>
|
0 commit comments