|
37 | 37 | <target name="compile-core" depends="init">
|
38 | 38 | <property name="assembly.name" value="GitSharp.Core" />
|
39 | 39 | <property name="assembly.type" value="library" />
|
40 |
| - |
| 40 | + |
41 | 41 | <fileset id="project.references" basedir="${path.lib}" >
|
42 | 42 | <include name="ICSharpCode.SharpZipLib.dll" />
|
43 | 43 | <include name="Winterdom.IO.FileMap.dll" />
|
|
64 | 64 | <include name="Commands.xml" />
|
65 | 65 | </fileset>
|
66 | 66 | </copy>
|
67 |
| - |
| 67 | + |
68 | 68 | <call target="compile-dll" />
|
69 | 69 | </target>
|
70 | 70 |
|
|
103 | 103 | <!-- ********************************************** -->
|
104 | 104 | <target name="run-tests" depends="compile-tests">
|
105 | 105 | <property name="path.testresults" value="${path.build}/${build.platform}-${build.config}/test-results" />
|
106 |
| - |
| 106 | + |
107 | 107 | <mkdir dir="${path.testresults}" if="${not(directory::exists(path.testresults))}"/>
|
108 | 108 | <echo message="path.testresults = ${path.testresults}"/>
|
109 | 109 |
|
|
112 | 112 | <include name="${path.build.output}/*.dll" />
|
113 | 113 | </fileset>
|
114 | 114 | </copy>
|
115 |
| - |
| 115 | + |
116 | 116 | <copy todir="${path.testresults}/Resources">
|
117 | 117 | <fileset basedir="${path.base}/GitSharp.Tests/Resources">
|
118 | 118 | <include name="**" />
|
|
140 | 140 | <property name="nunit.consolerunner" value="nunit-console2" />
|
141 | 141 | <property name="nunit.commandline" value="${path.testresults}/GitSharp.Tests.dll -xml:${path.testresults}/GitSharp.Tests.dll-results.xml -noshadow " />
|
142 | 142 | </if>
|
143 |
| - |
| 143 | + |
144 | 144 | <exec
|
145 | 145 | program="${nunit.consolerunner}"
|
146 | 146 | workingdir="${path.testresults}"
|
|
178 | 178 |
|
179 | 179 | <target name="compile-dll">
|
180 | 180 | <call target="copy-references"/>
|
181 |
| - |
| 181 | + |
182 | 182 | <property name="project.directory" value="${assembly.name}" />
|
183 | 183 | <property name="project.sources.path" value="${path.base}/${project.directory}"/>
|
184 | 184 |
|
185 |
| - <copy todir="${project.sources.path}"> |
186 |
| - <fileset> |
187 |
| - <include name="${path.base}/SharedAssemblyInfo.cs" /> |
188 |
| - </fileset> |
189 |
| - </copy> |
190 |
| - |
| 185 | + <call target="create-assembly-info"/> |
| 186 | + |
191 | 187 | <fileset id="project.sources" failonempty="true">
|
192 | 188 | <include name="${project.sources.path}/**/*.cs" />
|
193 | 189 | </fileset>
|
|
208 | 204 | </nowarn>
|
209 | 205 | </csc>
|
210 | 206 |
|
| 207 | + <call target="cleanup-assembly-info"/> |
| 208 | + </target> |
| 209 | + |
| 210 | + <target name="cleanup-assembly-info"> |
211 | 211 | <delete file="${project.sources.path}/SharedAssemblyInfo.cs" />
|
212 |
| - |
| 212 | + <delete file="${project.sources.path}/VersionAssemblyInfo.cs" /> |
| 213 | + </target> |
| 214 | + |
| 215 | + <target name="create-assembly-info"> |
| 216 | + <copy todir="${project.sources.path}"> |
| 217 | + <fileset> |
| 218 | + <include name="${path.base}/SharedAssemblyInfo.cs" /> |
| 219 | + </fileset> |
| 220 | + </copy> |
| 221 | + |
| 222 | + <asminfo output="${project.sources.path}/VersionAssemblyInfo.cs" language="CSharp"> |
| 223 | + <imports> |
| 224 | + <import namespace="System"/> |
| 225 | + <import namespace="System.Reflection"/> |
| 226 | + <import namespace="System.Runtime.InteropServices"/> |
| 227 | + </imports> |
| 228 | + <attributes> |
| 229 | + <attribute type="AssemblyVersionAttribute" value="${version}"/> |
| 230 | + <attribute type="AssemblyProductAttribute" value="GitSharp [${version.revision}]"/> |
| 231 | + </attributes> |
| 232 | + </asminfo> |
213 | 233 | </target>
|
214 | 234 |
|
215 | 235 | <target name="copy-references">
|
|
0 commit comments