summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-09-12 15:51:39 -0400
committerJames Moger <james.moger@gitblit.com>2011-09-12 15:51:39 -0400
commitff3015527b89a29df0918b7f9ff76f4c983ca7d2 (patch)
treee1d5dc82850e1ff89392b6a8ebdc677f198d76db
parent831469ba89ea8bca3bfbd1d662dbdd2c9f233798 (diff)
downloadgitblit-ff3015527b89a29df0918b7f9ff76f4c983ca7d2.tar.gz
gitblit-ff3015527b89a29df0918b7f9ff76f4c983ca7d2.zip
Adjustments to build script for missing build.properties (issue 18)
-rw-r--r--build.xml16
1 files changed, 13 insertions, 3 deletions
diff --git a/build.xml b/build.xml
index b3e97216..10259434 100644
--- a/build.xml
+++ b/build.xml
@@ -13,9 +13,19 @@
<property name="project.war.dir" value="${basedir}/war" />
<property name="project.site.dir" value="${basedir}/site" />
<property name="project.resources.dir" value="${basedir}/resources" />
+ <available property="hasBuildProps" file="${basedir}/build.properties"/>
- <!-- Load publication servers, paths, and credentials -->
- <loadproperties srcfile="${basedir}/build.properties" />
+ <!--
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Load build.properties, if available
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ -->
+ <target name="buildprops" if="hasBuildProps">
+ <!-- Load publication servers, paths, and credentials -->
+ <loadproperties>
+ <file file="${basedir}/build.properties" />
+ </loadproperties>
+ </target>
<!--
@@ -23,7 +33,7 @@
Scrape the version info from code and setup the build properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
- <target name="buildinfo">
+ <target name="buildinfo" depends="buildprops">
<!-- extract Gitblit version number from source code -->
<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">