diff options
author | James Moger <james.moger@gitblit.com> | 2011-05-17 22:06:07 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-05-17 22:06:07 -0400 |
commit | dd7961bc443c732d0bbdd6bda47d6c2cfda5b290 (patch) | |
tree | cc94487a5830d934832f314457a9e8a31bc4eb78 /build.xml | |
parent | 7812236b90f39fd92699017f376f1b50c4ea24cb (diff) | |
download | gitblit-dd7961bc443c732d0bbdd6bda47d6c2cfda5b290.tar.gz gitblit-dd7961bc443c732d0bbdd6bda47d6c2cfda5b290.zip |
Building site content and documentation from Markdown.
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 51 |
1 files changed, 41 insertions, 10 deletions
@@ -3,27 +3,27 @@ <!-- Project Properties -->
<property name="project.jar" value="gitblit.jar" />
- <property name="project.mainclass" value="com.gitblit.Launcher" />
+ <property name="project.mainclass" value="com.gitblit.Launcher" />
<property name="project.build.dir" value="${basedir}/build" />
<target name="main">
-
+
<!-- extract version number from source code -->
<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
<filterchain>
<linecontains>
- <contains value="public final static String VERSION = "/>
- </linecontains>
- <striplinebreaks/>
- <tokenfilter>
- <replacestring from="public final static String VERSION = "" to=""/>
- <replacestring from="";" to=""/>
+ <contains value="public final static String VERSION = " />
+ </linecontains>
+ <striplinebreaks />
+ <tokenfilter>
+ <replacestring from="public final static String VERSION = "" to="" />
+ <replacestring from="";" to="" />
<trim />
</tokenfilter>
</filterchain>
</loadfile>
<echo>Building Git:Blit ${gb.version}</echo>
-
+
<!-- copy required distribution files to project folder -->
<copy todir="${basedir}" overwrite="false">
<fileset dir="${basedir}/distrib">
@@ -31,7 +31,7 @@ <include name="users.properties" />
</fileset>
</copy>
-
+
<!-- Compile the build tool and execute it.
This downloads missing compile-time dependencies from Maven. -->
@@ -98,5 +98,36 @@ <include name="${project.jar}" />
</fileset>
</delete>
+
+ <!-- Build Site -->
+ <delete dir="${basedir}/site" />
+ <mkdir dir="${basedir}/site" />
+ <copy todir="${basedir}/site">
+ <fileset dir="${basedir}/src/com/gitblit/wicket/resources">
+ <include name="background.png" />
+ <include name="gitblit.css" />
+ <include name="markdown.css" />
+ <include name="gitblt_25.png" />
+ <include name="gitblt-favicon.png" />
+ </fileset>
+ <fileset dir="${basedir}/docs">
+ <include name="*.png" />
+ </fileset>
+ </copy>
+ <java classpath="${project.build.dir}" classname="com.gitblit.BuildSite">
+ <classpath refid="master-classpath" />
+ <arg value="--sourceFolder" />
+ <arg value="${basedir}/docs" />
+
+ <arg value="--outputFolder" />
+ <arg value="${basedir}/site" />
+
+ <arg value="--pageHeader" />
+ <arg value="${basedir}/docs/page_header.html" />
+
+ <arg value="--pageFooter" />
+ <arg value="${basedir}/docs/page_footer.html" />
+ </java>
+
</target>
</project>
|