| | |
| | | <!-- Project Properties -->
|
| | | <property name="project.jar" value="gitblit.jar" />
|
| | | <property name="project.mainclass" value="com.gitblit.Launcher" />
|
| | | <property name="distribution.zipfile" value="gitblit.zip" />
|
| | | <property name="project.build.dir" value="${basedir}/build" />
|
| | |
|
| | | <target name="main">
|
| | |
|
| | | <!-- build dsate -->
|
| | | <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">
|
| | | <filterchain>
|
| | | <linecontains>
|
| | | <contains value="public static final String VERSION = " />
|
| | | </linecontains>
|
| | | <striplinebreaks />
|
| | | <tokenfilter>
|
| | | <replacestring from="public static final String VERSION = "" to="" />
|
| | | <replacestring from="";" to="" />
|
| | | <trim />
|
| | | </tokenfilter>
|
| | | </filterchain>
|
| | | </loadfile>
|
| | |
|
| | | <!-- extract JGit version number from source code -->
|
| | | <loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
| | | <filterchain>
|
| | | <linecontains>
|
| | | <contains value="public static final String JGIT_VERSION = " />
|
| | | </linecontains>
|
| | | <striplinebreaks />
|
| | | <tokenfilter>
|
| | | <replacestring from="public static final String JGIT_VERSION = "" to="" />
|
| | | <replacestring from="";" to="" />
|
| | | <trim />
|
| | | </tokenfilter>
|
| | | </filterchain>
|
| | | </loadfile>
|
| | | <echo>Building Gitblit ${gb.version}</echo>
|
| | |
|
| | | <!-- copy required distribution files to project folder -->
|
| | | <copy todir="${basedir}" overwrite="false">
|
| | | <fileset dir="${basedir}/distrib">
|
| | | <include name="gitblit.properties" />
|
| | | <include name="users.properties" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Compile the build tool and execute it.
|
| | | This downloads missing compile-time dependencies from Maven. -->
|
| | |
| | |
|
| | | <!-- Compile Project -->
|
| | | <path id="master-classpath">
|
| | | <fileset dir="${basedir}/lib">
|
| | | <include name="*.jar" />
|
| | | </fileset>
|
| | | <fileset dir="${basedir}/ext">
|
| | | <include name="*.jar" />
|
| | | </fileset>
|
| | |
| | |
|
| | | <!-- Build jar -->
|
| | | <delete file="${project.jar}" />
|
| | | <jar index="true" jarfile="${project.jar}">
|
| | | <jar jarfile="${project.jar}">
|
| | | <fileset dir="${project.build.dir}">
|
| | | <include name="**/*" />
|
| | | </fileset>
|
| | | <manifest>
|
| | | <attribute name="Main-Class" value="${project.mainclass}" />
|
| | | </manifest>
|
| | | <indexjars>
|
| | | <fileset dir="${basedir}/lib" />
|
| | | </indexjars>
|
| | | </jar>
|
| | |
|
| | | <!-- Build Site -->
|
| | | <delete dir="${basedir}/site" />
|
| | | <mkdir dir="${basedir}/site" />
|
| | | <copy todir="${basedir}/site">
|
| | | <!-- Copy selected Gitblit resources -->
|
| | | <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" />
|
| | | <include name="lock_go_16x16.png" />
|
| | | <include name="lock_pull_16x16.png" />
|
| | | <include name="shield_16x16.png" />
|
| | | <include name="cold_16x16.png" />
|
| | | <include name="bug_16x16.png" />
|
| | | <include name="book_16x16.png" />
|
| | | <include name="blank.png" />
|
| | | </fileset>
|
| | |
|
| | | <!-- Copy Doc images -->
|
| | | <fileset dir="${basedir}/docs">
|
| | | <include name="*.png" />
|
| | | <include name="*.js" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Copy Fancybox -->
|
| | | <mkdir dir="${basedir}/site/fancybox" />
|
| | | <copy todir="${basedir}/site/fancybox">
|
| | | <fileset dir="${basedir}/docs/fancybox">
|
| | | <exclude name="thumbs.db" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Copy google-code-prettify -->
|
| | | <mkdir dir="${basedir}/src/com/gitblit/wicket/pages/prettify" />
|
| | | <copy todir="${basedir}/site/prettify">
|
| | | <fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
| | | <exclude name="thumbs.db" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Copy screenshot thumbnails -->
|
| | | <mkdir dir="${basedir}/site/thumbs" />
|
| | | <copy todir="${basedir}/site/thumbs">
|
| | | <fileset dir="${basedir}/docs/screenshots/thumbs">
|
| | | <include name="*.png" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Copy screenshots -->
|
| | | <mkdir dir="${basedir}/site/screenshots" />
|
| | | <copy todir="${basedir}/site/screenshots">
|
| | | <fileset dir="${basedir}/docs/screenshots">
|
| | | <include name="*.png" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Build site pages -->
|
| | | <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" />
|
| | |
|
| | | <arg value="--alias" />
|
| | | <arg value="index=overview" />
|
| | |
|
| | | <arg value="--alias" />
|
| | | <arg value="properties=gitblit.properties" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%VERSION%=${gb.version}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%DISTRIBUTION%=${distribution.zipfile}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%BUILDDATE%=${gb.buildDate}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%JGIT%=${jgit.version}" />
|
| | |
|
| | | <arg value="--load" />
|
| | | <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
| | |
|
| | | </java>
|
| | |
|
| | | <!-- Delete the deploy folder -->
|
| | | <delete dir="${basedir}/deploy" />
|
| | |
| | | <!-- Create deployment folder structure -->
|
| | | <mkdir dir="${basedir}/deploy" />
|
| | | <copy todir="${basedir}/deploy" file="${project.jar}" />
|
| | | <copy todir="${basedir}/deploy/lib">
|
| | | <fileset dir="${basedir}/lib">
|
| | | <include name="**/*.jar" />
|
| | | </fileset>
|
| | | </copy>
|
| | | <copy todir="${basedir}/deploy">
|
| | | <fileset dir="${basedir}/service">
|
| | | <fileset dir="${basedir}/distrib">
|
| | | <include name="**/*" />
|
| | | </fileset>
|
| | | <fileset dir="${basedir}">
|
| | | <include name="*.cmd" />
|
| | | <include name="*.properties" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Build Deployment Docs -->
|
| | | <mkdir dir="${basedir}/deploy/docs" />
|
| | | <copy todir="${basedir}/deploy/docs">
|
| | | <!-- Copy selected Gitblit resources -->
|
| | | <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" />
|
| | | <include name="lock_go_16x16.png" />
|
| | | <include name="lock_pull_16x16.png" />
|
| | | <include name="shield_16x16.png" />
|
| | | <include name="cold_16x16.png" />
|
| | | <include name="bug_16x16.png" />
|
| | | <include name="book_16x16.png" />
|
| | | <include name="blank.png" />
|
| | | </fileset>
|
| | |
|
| | | <!-- Copy Doc images -->
|
| | | <fileset dir="${basedir}/docs">
|
| | | <include name="*.png" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Copy google-code-prettify -->
|
| | | <mkdir dir="${basedir}/src/com/gitblit/wicket/pages/prettify" />
|
| | | <copy todir="${basedir}/deploy/docs/prettify">
|
| | | <fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
| | | <exclude name="thumbs.db" />
|
| | | </fileset>
|
| | | </copy>
|
| | |
|
| | | <!-- Build deployment doc pages -->
|
| | | <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}/deploy/docs" />
|
| | |
|
| | | <arg value="--pageHeader" />
|
| | | <arg value="${basedir}/docs/page_header.html" />
|
| | |
|
| | | <arg value="--pageFooter" />
|
| | | <arg value="${basedir}/docs/page_footer.html" />
|
| | |
|
| | | <arg value="--skip" />
|
| | | <arg value="screenshots" />
|
| | |
|
| | | <arg value="--skip" />
|
| | | <arg value="releases" />
|
| | |
|
| | | <arg value="--alias" />
|
| | | <arg value="index=overview" />
|
| | |
|
| | | <arg value="--alias" />
|
| | | <arg value="properties=gitblit.properties" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%VERSION%=${gb.version}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%DISTRIBUTION%=${distribution.zipfile}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%BUILDDATE%=${gb.buildDate}" />
|
| | |
|
| | | <arg value="--substitute" />
|
| | | <arg value="%JGIT%=${jgit.version}" />
|
| | |
|
| | | <arg value="--load" />
|
| | | <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
| | |
|
| | | </java>
|
| | |
|
| | | <!-- Create Zip deployment -->
|
| | | <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
|
| | | <zip destfile="${distribution.zipfile}">
|
| | | <fileset dir="${basedir}/deploy">
|
| | | <include name="**/*" />
|
| | |
| | | <include name="${project.jar}" />
|
| | | </fileset>
|
| | | </delete>
|
| | | <!-- Cleanup -->
|
| | | <delete dir="${project.build.dir}" />
|
| | | </target>
|
| | | </project>
|