summaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml25
1 files changed, 18 insertions, 7 deletions
diff --git a/build.xml b/build.xml
index e1981a11..2ff62644 100644
--- a/build.xml
+++ b/build.xml
@@ -23,10 +23,6 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="buildinfo">
- <!-- build date -->
- <tstamp>
- <format property="gb.buildDate" pattern="yyyy-MM-dd" />
- </tstamp>
<!-- extract Gitblit version number from source code -->
<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
@@ -42,7 +38,22 @@
</tokenfilter>
</filterchain>
</loadfile>
-
+
+ <!-- extract Gitblit version date from source code -->
+ <loadfile property="gb.versionDate" srcfile="${basedir}/src/com/gitblit/Constants.java">
+ <filterchain>
+ <linecontains>
+ <contains value="public static final String VERSION_DATE = " />
+ </linecontains>
+ <striplinebreaks />
+ <tokenfilter>
+ <replacestring from="public static final String VERSION_DATE = &quot;" to="" />
+ <replacestring from="&quot;;" to="" />
+ <trim />
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+
<!-- extract JGit version number from source code -->
<loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
<filterchain>
@@ -229,7 +240,7 @@
<arg value="%WAR%=${distribution.warfile}" />
<arg value="--substitute" />
- <arg value="%BUILDDATE%=${gb.buildDate}" />
+ <arg value="%BUILDDATE%=${gb.versionDate}" />
<arg value="--substitute" />
<arg value="%JGIT%=${jgit.version}" />
@@ -424,7 +435,7 @@
<arg value="%WAR%=${distribution.warfile}" />
<arg value="--substitute" />
- <arg value="%BUILDDATE%=${gb.buildDate}" />
+ <arg value="%BUILDDATE%=${gb.versionDate}" />
<arg value="--substitute" />
<arg value="%JGIT%=${jgit.version}" />