← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS 2 Revision from Deployed App

 

Working with our sysadmin we discovered this will work 

unzip -q -p /usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/dhis-service-core-2.*.jar build.properties

Producing: 
build.version = 2.20
build.time = 2015-08-21 14:51:22
build.revision = 19785

> On Aug 17, 2015, at 3:30 PM, Dan Cocos <dan@xxxxxxxxxxxx> wrote:
> 
> Hi All, 
> 
> I thought this would be a straightforward task but it appears to require arcane knowledge. 
> I’m working with a few instances where I don’t have a DHIS 2 User account on the server I’m hosting so I cannot look at the About page but I would like to know the revision of the build.
> 
> Checking out a specific revision
> 
> ocelot|code:bzr branch -r 19119 lp:dhis2 b19119
> ocelot|code:ls
> 2.17   2.18   b19119 dhis2  
> ocelot|code:cd b19119/
> ocelot|b19119:ls
> dhis-2 local
> ocelot|b19119:cd dhis-2/
> ocelot|dhis-2:./build.sh
> --mvn builds the project--
> 
> ocelot|dhis-2: zgrep -R 19119 *
> dhis-services/dhis-service-core/target/antrun/build-main.xml:  <mkdir dir="/Users/dan/dhis2/code/b19119/dhis-2/dhis-services/dhis-service-core/target/classes"/>
> dhis-services/dhis-service-core/target/antrun/build-main.xml:  <echo file="/Users/dan/dhis2/code/b19119/dhis-2/dhis-services/dhis-service-core/target/classes/build.properties" message="build.version = 2.20-SNAPSHOT&#10;build.time = ${now}&#10;build.revision = ${revision}&#10;"/>
> dhis-services/dhis-service-core/target/classes/build.properties:build.revision = 19119
> 11:58:44|ocelot|dhis-2:
> 
> It looks like the only place I can find the build revision number gets packaged in a jar and compressed. Is there anyway to find it by searching the exploded war file? 
> 
> Thanks,
> Dan



Follow ups

References