logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1174174 - in /logging/log4net/trunk: log4net.build pom.xml src/AssemblyInfo.cs
Date Thu, 22 Sep 2011 14:49:00 GMT
Author: bodewig
Date: Thu Sep 22 14:49:00 2011
New Revision: 1174174

URL: http://svn.apache.org/viewvc?rev=1174174&view=rev
Log:
Add svn revision and URL to AssemblyDescription attribute, based on suggestions by Michael
Schall and a code example by Domink Guder

Modified:
    logging/log4net/trunk/log4net.build
    logging/log4net/trunk/pom.xml
    logging/log4net/trunk/src/AssemblyInfo.cs

Modified: logging/log4net/trunk/log4net.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.build?rev=1174174&r1=1174173&r2=1174174&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.build (original)
+++ logging/log4net/trunk/log4net.build Thu Sep 22 14:49:00 2011
@@ -198,7 +198,8 @@ limitations under the License.
     <mkdir dir="${current.package.dir}" />
   </target>
   <!-- Target for compiling all build configurations for all runtime configurations -->
-  <target name="compile-all" description="Compile all build configurations for all runtime
configurations">
+  <target name="compile-all" description="Compile all build configurations for all runtime
configurations"
+          depends="generate-assembly-description">
     <echo message="Compiling all build configurations for all runtime configurations."
/>
     <call target="set-debug-build-configuration" />
     <call target="compile-build" />
@@ -1615,22 +1616,41 @@ limitations under the License.
     <nant buildfile="${log4net.basedir}/extensions/nant.build" target="compile" inheritall="false"
/>
   </target>
 
-  <target name="set-build-number">
-    <if test="${not(property::exists('assembly.version.number'))}">
-      <property name="assembly.version.number" value="0"/>
+  <target name="generate-assembly-description">
+    <if test="${not(property::exists('source.svn.revision'))}">
+      <property name="source.svn.revision" value="0"/>
+      <property name="source.svn.url" value=""/>
+      <property name="assembly.description"
+                value="The Apache Software Foundation log4net Logging Framework"/>
       <if test="${directory::exists('.svn')}">
         <exec program="svn" workingdir="." verbose="false"
               output="_svnrevision.xml" failonerror="true" >
-          <arg value="log" />
-          <arg line="--xml --limit 1 -q" />
+          <arg value="info" />
+          <arg line="--xml" />
         </exec>
         <sleep milliseconds="500" />
         <xmlpeek file="_svnrevision.xml"
-                 xpath="/log/logentry/@revision"
-                 property="assembly.version.number"
+                 xpath="/info/entry/@revision"
+                 property="source.svn.revision"
+                 failonerror="true"/>
+        <xmlpeek file="_svnrevision.xml"
+                 xpath="/info/entry/url"
+                 property="source.svn.url"
                  failonerror="true"/>
         <delete file="_svnrevision.xml"/>
+        <property name="assembly.description"
+                  value="The Apache Software Foundation log4net Logging Framework built from
svn revision ${source.svn.revision} of ${source.svn.url}"/>
       </if>
+      <delete file="src/GeneratedAssemblyInfo.cs"/>
+      <asminfo language="CSharp" output="src/GeneratedAssemblyInfo.cs">
+        <imports>
+          <import namespace="System.Reflection"/>
+        </imports>
+        <attributes>
+          <attribute type="AssemblyDescriptionAttribute"
+                     value="${assembly.description}"/>
+        </attributes>
+      </asminfo>
     </if>
   </target>
 </project>

Modified: logging/log4net/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/pom.xml?rev=1174174&r1=1174173&r2=1174174&view=diff
==============================================================================
--- logging/log4net/trunk/pom.xml (original)
+++ logging/log4net/trunk/pom.xml Thu Sep 22 14:49:00 2011
@@ -159,6 +159,7 @@
             <exclude>build/**</exclude>
             <exclude>doc/sdk/**</exclude>
             <exclude>src/log4net.xml</exclude>
+            <exclude>src/GeneratedAssemblyInfo.cs</exclude>
             <exclude>tests/bin/**</exclude>
 
             <!-- really README files -->

Modified: logging/log4net/trunk/src/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/AssemblyInfo.cs?rev=1174174&r1=1174173&r2=1174174&view=diff
==============================================================================
--- logging/log4net/trunk/src/AssemblyInfo.cs (original)
+++ logging/log4net/trunk/src/AssemblyInfo.cs Thu Sep 22 14:49:00 2011
@@ -93,7 +93,6 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyConfiguration("Retail")]
 #endif
 
-[assembly: AssemblyDescription("The Apache Software Foundation log4net Logging Framework")]
 [assembly: AssemblyProduct("log4net")]
 [assembly: AssemblyDefaultAlias("log4net")]
 [assembly: AssemblyCulture("")]		



Mime
View raw message