NIHVIVO-1229 Add revisionInfo steps to the build files. Tweak the response parser in the utility.
This commit is contained in:
parent
8263bd9cf1
commit
fe5a4f12cd
3 changed files with 88 additions and 6 deletions
|
@ -254,10 +254,48 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
|
|||
</java>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: revisionInfo
|
||||
================================= -->
|
||||
<target name="revisionInfo" depends="test" description="--> Store revision info in build">
|
||||
<property name="revisionInfo.product.dir" location="${ant.file.vitroCore}/.." />
|
||||
<property name="revisionInfo.build.file" location="${war-classes.dir}/revisionInfo.txt" />
|
||||
|
||||
<delete file="${revisionInfo.build.file}" />
|
||||
|
||||
<tstamp>
|
||||
<format property="revisionInfo.timestamp" pattern="yyyy-MM-dd HH:mm:ss" />
|
||||
</tstamp>
|
||||
<echo file="${revisionInfo.build.file}">${revisionInfo.timestamp}
|
||||
</echo>
|
||||
|
||||
<javac srcdir="${webapp.dir}/../utilities/buildutils/revisioninfo"
|
||||
destdir="${test-classes.dir}"
|
||||
debug="true"
|
||||
deprecation="true"
|
||||
optimize="false"
|
||||
source="1.6">
|
||||
</javac>
|
||||
|
||||
<java classname="edu.cornell.mannlib.vitro.utilities.revisioninfo.RevisionInfoBuilder"
|
||||
fork="no"
|
||||
failonerror="true"
|
||||
logerror="true"
|
||||
outputproperty="revisionInfo.outputLine">
|
||||
<classpath refid="test.run.classpath" />
|
||||
<arg value="${ant.project.name}" />
|
||||
<arg file="${revisionInfo.product.dir}" />
|
||||
</java>
|
||||
<echo file="${revisionInfo.build.file}" append="true">${revisionInfo.outputLine}
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: deploy
|
||||
================================= -->
|
||||
<target name="deploy" depends="test" description="--> Build the app and install in Tomcat">
|
||||
<target name="deploy"
|
||||
depends="revisionInfo"
|
||||
description="--> Build the app and install in Tomcat">
|
||||
<property name="webapp.deploy.home" value="${tomcat.home}/webapps/${webapp.name}" />
|
||||
|
||||
<mkdir dir="${webapp.deploy.home}" />
|
||||
|
|
|
@ -181,20 +181,47 @@
|
|||
<arg value="${testlevel}" />
|
||||
</java>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: revisionInfo
|
||||
================================= -->
|
||||
<target name="revisionInfo" description="--> Store revision info in build">
|
||||
<innercall target="revisionInfo" />
|
||||
<antcall target="productRevisionInfo" />
|
||||
</target>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - -
|
||||
target: productRevisionInfo
|
||||
- - - - - - - - - - - - - - - - - -->
|
||||
<target name="productRevisionInfo">
|
||||
<property name="revisionInfo.product.dir" location="${ant.file}/.." />
|
||||
<property name="revisionInfo.build.file" location="${war-classes.dir}/revisionInfo.txt" />
|
||||
|
||||
<java classname="edu.cornell.mannlib.vitro.utilities.revisioninfo.RevisionInfoBuilder"
|
||||
fork="no"
|
||||
failonerror="true"
|
||||
logerror="true"
|
||||
outputproperty="revisionInfo.outputLine">
|
||||
<classpath refid="test.run.classpath" />
|
||||
<arg value="${ant.project.name}" />
|
||||
<arg file="${revisionInfo.product.dir}" />
|
||||
</java>
|
||||
<echo file="${revisionInfo.build.file}" append="true">${revisionInfo.outputLine}
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: deploy
|
||||
================================= -->
|
||||
<target name="deploy" description="--> Build the app and install in Tomcat">
|
||||
<!-- the inner "deploy" would just do a sync that will be done by productDeploy -->
|
||||
<innercall target="test" />
|
||||
<innercall target="revisionInfo" />
|
||||
<antcall target="productDeploy" />
|
||||
</target>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - -
|
||||
target: productDeploy
|
||||
- - - - - - - - - - - - - - - - - -->
|
||||
<target name="productDeploy" depends="productTest">
|
||||
<target name="productDeploy" depends="productRevisionInfo">
|
||||
<property name="webapp.deploy.home" value="${tomcat.home}/webapps/${webapp.name}" />
|
||||
|
||||
<mkdir dir="${webapp.deploy.home}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue