← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1563: added revision number to About screen. For blueprint: dhis2-build-number

 

------------------------------------------------------------
revno: 1563
committer: Saptarshi <sunbiz@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-03-05 21:54:16 +0100
message:
  added revision number to About screen. For blueprint: dhis2-build-number
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm
  dhis-2/dhis-web/dhis-web-commons/pom.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm	2010-01-04 12:33:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm	2010-03-05 20:54:16 +0000
@@ -2,7 +2,7 @@
 
 <dl>
   <dt>$i18n.getString( "current_user" ):</dt><dd>$!currentUsername</dd>
-  <dt>$i18n.getString( "version" ):</dt><dd>$!version</dd>
+  <dt>$i18n.getString( "version" ):</dt><dd>$!version - rev: $!revision</dd>
   <dt>$i18n.getString( "build_date" ):</dt><dd>$format.formatDateTime( $!buildTime )</dd>
   <dt>$i18n.getString( "user_agent" ):</dt><dd>$!userAgent</dd>
   <dt>$i18n.getString( "external_configuration_directory" ):</dt><dd>$!externalDirectory</dd>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/pom.xml'
--- dhis-2/dhis-web/dhis-web-commons/pom.xml	2010-01-28 15:23:28 +0000
+++ dhis-2/dhis-web/dhis-web-commons/pom.xml	2010-03-05 20:54:16 +0000
@@ -26,8 +26,11 @@
                   <format property="now" pattern="yyyy-MM-dd HH:mm:ss"/>
                 </tstamp>
                 <mkdir dir="${project.build.outputDirectory}"/>
+                <exec executable="bzr" outputproperty="revision">
+                      <arg value="revno"/>
+                </exec>
                 <echo file="${project.build.outputDirectory}/build.properties"
-                  message="build.version = ${version}&#10;build.time = ${now}&#10;"/>
+                  message="build.version = ${version}&#10;build.time = ${now}&#10;build.revision = ${revision}&#10;"/>
               </tasks>
             </configuration>
             <goals>
@@ -150,7 +153,7 @@
       <artifactId>jcommon</artifactId>
     </dependency>
   </dependencies>
-  <properties>
-    <rootDir>../../</rootDir>
-  </properties>
+  <properties>
+    <rootDir>../../</rootDir>
+  </properties>
 </project>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java	2010-01-04 12:33:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java	2010-03-05 20:54:16 +0000
@@ -88,6 +88,13 @@
         return version;
     }
 
+    private String revision;
+
+    public String getRevision()
+    {
+        return revision;
+    }
+
     private Date buildTime;
 
     public Date getBuildTime()
@@ -156,6 +163,8 @@
 
         version = properties.getProperty( "build.version" );
 
+        revision = properties.getProperty( "build.revision" );
+
         String buildTime = properties.getProperty( "build.time" );
 
         DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );


Follow ups