summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2014-06-24 07:41:41 -0700
committerJesse Morgan <jesse@jesterpm.net>2014-06-24 07:41:41 -0700
commit14f334da61fd143405dd24bc97478578b2869164 (patch)
treeb2534cfa01358a7c410806b0c065646297aa1a20
parent42683efab25f2463624b73bd5a6c4c6cf63dbd89 (diff)
Adding current version to the footer.20140624a
-rw-r--r--build.xml10
-rw-r--r--src/templates/pages/version.ftl1
-rw-r--r--src/templates/templates/footer.ftl3
-rw-r--r--src/templates/templates/gitversion.ftl1
4 files changed, 15 insertions, 0 deletions
diff --git a/build.xml b/build.xml
index 625c4a6..951cf03 100644
--- a/build.xml
+++ b/build.xml
@@ -14,6 +14,16 @@
<!-- Targets to get this project ready -->
<target name="bootstrap" depends="setup-tomcat" />
+ <target name="compile" depends="gitrevision,build-common.compile">
+ <copy file="src/templates/templates/gitversion.ftl" tofile="${build.dir}/${build.classes}/templates/templates/gitversion.ftl" overwrite="yes">
+ <filterchain>
+ <replacetokens>
+ <token key="repository.version" value="${repository.version}" />
+ </replacetokens>
+ </filterchain>
+ </copy>
+ </target>
+
<target name="server" depends="compile">
<java classname="com.p4square.grow.GrowProcessComponent"
classpathref="classpath.run" fork="true">
diff --git a/src/templates/pages/version.ftl b/src/templates/pages/version.ftl
new file mode 100644
index 0000000..d8a38a2
--- /dev/null
+++ b/src/templates/pages/version.ftl
@@ -0,0 +1 @@
+Current version <#include "/templates/gitversion.ftl">
diff --git a/src/templates/templates/footer.ftl b/src/templates/templates/footer.ftl
index cc080de..8ea05fe 100644
--- a/src/templates/templates/footer.ftl
+++ b/src/templates/templates/footer.ftl
@@ -7,6 +7,9 @@
<div class="right">
&copy;2013 <a href="http://myfoursquarechurch.com">Foursquare Church</a>
+ <#if config.getDomain() != "prod">
+ - <#include "/templates/gitversion.ftl">
+ </#if>
</div>
</footer>
diff --git a/src/templates/templates/gitversion.ftl b/src/templates/templates/gitversion.ftl
new file mode 100644
index 0000000..09e2f95
--- /dev/null
+++ b/src/templates/templates/gitversion.ftl
@@ -0,0 +1 @@
+@repository.version@