123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="gitblit" default="compile" basedir=".">
-
- <!-- Google Code upload task -->
- <taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
- classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
-
- <!-- GenJar task -->
- <taskdef resource="genjar.properties" classpath="${basedir}/tools/GenJar.jar" />
-
- <!-- Project Properties -->
- <property name="project.jar" value="gitblit.jar" />
- <property name="project.mainclass" value="com.gitblit.Launcher" />
- <property name="project.build.dir" value="${basedir}/build" />
- <property name="project.deploy.dir" value="${basedir}/deploy" />
- <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 build.properties, if available
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildprops" if="hasBuildProps">
- <!-- Load publication servers, paths, and credentials -->
- <loadproperties>
- <file file="${basedir}/build.properties" />
- </loadproperties>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Scrape the version info from code and setup the build properties
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildinfo" depends="buildprops">
-
- <!-- 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 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 = "" 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>
- <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
- <property name="distribution.warfile" value="gitblit-${gb.version}.war" />
- <property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
- <property name="manager.jarfile" value="manager-${gb.version}.jar" />
- <property name="gbapi.zipfile" value="gbapi-${gb.version}.zip" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Compile
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="compile" depends="buildinfo" description="Retrieves dependencies and compiles Gitblit from source">
-
- <!-- 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>
-
- <!-- copy gitblit.properties to the WEB-INF folder.
- this file is only used for parsing setting descriptions. -->
- <copy tofile="${basedir}/src/WEB-INF/reference.properties" overwrite="true"
- file="${basedir}/distrib/gitblit.properties" />
-
- <!-- Compile the build tool and execute it.
- This downloads missing compile-time dependencies from Maven. -->
-
- <delete dir="${project.build.dir}" />
- <mkdir dir="${project.build.dir}" />
- <javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}">
- <include name="com/gitblit/build/Build.java" />
- <include name="com/gitblit/Constants.java" />
- <include name="com/gitblit/utils/StringUtils.java" />
- </javac>
- <java classpath="${project.build.dir}" classname="com.gitblit.build.Build" />
-
- <!-- Compile Project -->
- <path id="master-classpath">
- <fileset dir="${basedir}/ext">
- <include name="*.jar" />
- </fileset>
- <pathelement path="${project.build.dir}" />
- </path>
- <javac debug="true" destdir="${project.build.dir}" failonerror="false">
- <src path="${basedir}/src" />
- <classpath refid="master-classpath" />
- </javac>
- <copy todir="${project.build.dir}">
- <fileset dir="${basedir}/src" excludes="**/*.java,**/thumbs.db" />
- </copy>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit GO
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
-
- <echo>Building Gitblit GO ${gb.version}</echo>
-
- <!-- Delete the deploy folder -->
- <delete dir="${project.deploy.dir}" />
-
- <!-- Create deployment folder structure -->
- <mkdir dir="${project.deploy.dir}" />
- <copy todir="${project.deploy.dir}">
- <fileset dir="${basedir}/distrib">
- <include name="**/*" />
- <exclude name="federation.properties" />
- </fileset>
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- </copy>
-
- <!-- Build jar -->
- <jar jarfile="${project.deploy.dir}/${project.jar}">
- <fileset dir="${project.build.dir}">
- <include name="**/*" />
- <exclude name="com/gitblit/client/**" />
- </fileset>
- <fileset dir="${project.resources.dir}">
- <exclude name="thumbs.db" />
- </fileset>
- <manifest>
- <attribute name="Main-Class" value="${project.mainclass}" />
- </manifest>
- </jar>
-
- <!-- Build the docs for the deploy -->
- <antcall target="buildDocs" inheritall="true" inheritrefs="true">
- <param name="docs.output.dir" value="${project.deploy.dir}/docs" />
- </antcall>
-
- <!-- Create Zip deployment -->
- <zip destfile="${distribution.zipfile}">
- <fileset dir="${project.deploy.dir}">
- <include name="**/*" />
- </fileset>
- </zip>
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit Docs which are bundled with GO and WAR downloads
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildDocs">
- <!-- Build Docs -->
- <mkdir dir="${docs.output.dir}" />
- <copy todir="${docs.output.dir}">
- <!-- Copy selected Gitblit resources -->
- <fileset dir="${project.resources.dir}">
- <include name="bootstrap.130.css" />
- <include name="bootstrap.gb.css" />
- <include name="markdown.css" />
- <include name="gitblt_25_white.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" />
- <include name="federated_16x16.png" />
- <include name="arrow_page.png" />
- </fileset>
-
- <!-- Copy Doc images -->
- <fileset dir="${basedir}/docs">
- <include name="*.png" />
- </fileset>
- </copy>
-
- <!-- Copy google-code-prettify -->
- <mkdir dir="${docs.output.dir}/prettify" />
- <copy todir="${docs.output.dir}/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.build.BuildSite">
- <classpath refid="master-classpath" />
- <arg value="--sourceFolder" />
- <arg value="${basedir}/docs" />
-
- <arg value="--outputFolder" />
- <arg value="${docs.output.dir}" />
-
- <arg value="--pageHeader" />
- <arg value="${basedir}/docs/doc_header.html" />
-
- <arg value="--pageFooter" />
- <arg value="${basedir}/docs/doc_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=settings" />
-
- <arg value="--substitute" />
- <arg value="%VERSION%=${gb.version}" />
-
- <arg value="--substitute" />
- <arg value="%GO%=${distribution.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%WAR%=${distribution.warfile}" />
-
- <arg value="--substitute" />
- <arg value="%FEDCLIENT%=${fedclient.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%MANAGER%=${manager.jarfile}" />
-
- <arg value="--substitute" />
- <arg value="%API%=${gbapi.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%BUILDDATE%=${gb.versionDate}" />
-
- <arg value="--substitute" />
- <arg value="%JGIT%=${jgit.version}" />
-
- <arg value="--properties" />
- <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
-
- <arg value="--nomarkdown" />
- <arg value="%BEGINCODE%:%ENDCODE%" />
-
- <arg value="--substitute" />
- <arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
-
- <arg value="--substitute" />
- <arg value="%ENDCODE%=</pre>" />
-
- <arg value="--regex" />
- <arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
-
- </java>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit WAR
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildWAR" depends="compile" description="Build Gitblit WAR">
-
- <echo>Building Gitblit WAR ${gb.version}</echo>
-
- <delete dir="${project.war.dir}" />
-
- <!-- Copy web.xml and users.properties to WEB-INF -->
- <copy todir="${project.war.dir}/WEB-INF">
- <fileset dir="${basedir}/distrib">
- <include name="users.properties" />
- </fileset>
- <fileset dir="${basedir}/src/WEB-INF">
- <include name="web.xml" />
- </fileset>
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- </copy>
-
- <!-- Copy gitblit.properties as reference.properties -->
- <copy tofile="${project.war.dir}/WEB-INF/reference.properties"
- file="${basedir}/distrib/gitblit.properties"/>
-
- <!-- Build the docs for the WAR build -->
- <antcall target="buildDocs" inheritall="true" inheritrefs="true">
- <param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
- </antcall>
-
- <!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
- <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
- <classpath refid="master-classpath" />
-
- <arg value="--sourceFile" />
- <arg value="${basedir}/src/WEB-INF/web.xml" />
-
- <arg value="--destinationFile" />
- <arg value="${project.war.dir}/WEB-INF/web.xml" />
-
- <arg value="--propertiesFile" />
- <arg value="${basedir}/distrib/gitblit.properties" />
- </java>
-
- <!-- Gitblit resources -->
- <copy todir="${project.war.dir}">
- <fileset dir="${project.resources.dir}">
- <exclude name="thumbs.db" />
- </fileset>
- </copy>
-
- <!-- Gitblit library dependencies -->
- <mkdir dir="${project.war.dir}/WEB-INF/lib"/>
- <copy todir="${project.war.dir}/WEB-INF/lib">
- <fileset dir="${basedir}/ext">
- <exclude name="*-sources.jar" />
- <exclude name="*-javadoc.jar" />
- <exclude name="jcommander*.jar" />
- <exclude name="jetty*.jar" />
- <exclude name="junit*.jar" />
- <exclude name="servlet*.jar" />
- </fileset>
- </copy>
-
- <!-- Gitblit classes -->
- <mkdir dir="${project.war.dir}/WEB-INF/classes"/>
- <copy todir="${project.war.dir}/WEB-INF/classes">
- <fileset dir="${project.build.dir}">
- <exclude name="WEB-INF/web.xml" />
- <exclude name="com/gitblit/tests/" />
- <exclude name="com/gitblit/build/**" />
- <exclude name="com/gitblit/client/**" />
- <exclude name="com/gitblit/GitBlitServer*.class" />
- <exclude name="com/gitblit/Launcher*.class" />
- <exclude name="com/gitblit/MakeCertificate*.class" />
- </fileset>
- </copy>
-
- <!-- Build the WAR file -->
- <jar basedir="${project.war.dir}" destfile="${distribution.warfile}" compress="true" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the stand-alone, command-line Gitblit Federation Client
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
- <echo>Building Gitblit Federation Client ${gb.version}</echo>
-
- <genjar jarfile="fedclient.jar">
- <class name="com.gitblit.FederationClientLauncher" />
- <resource file="${project.build.dir}/log4j.properties" />
- <classfilter>
- <exclude name="org.apache." />
- <exclude name="org.bouncycastle." />
- <exclude name="org.eclipse." />
- <exclude name="org.slf4j." />
- <exclude name="com.beust." />
- <exclude name="com.google." />
- </classfilter>
- <classpath refid="master-classpath" />
- <manifest>
- <attribute name="Main-Class" value="com.gitblit.FederationClientLauncher" />
- <attribute name="Specification-Version" value="${gb.version}" />
- <attribute name="Release-Date" value="${gb.versionDate}" />
- </manifest>
- </genjar>
-
- <!-- Build the federation client zip file -->
- <zip destfile="${fedclient.zipfile}">
- <fileset dir="${basedir}">
- <include name="fedclient.jar" />
- </fileset>
- <fileset dir="${basedir}/distrib">
- <include name="federation.properties" />
- </fileset>
- </zip>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the stand-alone, Gitblit Manager
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
- <echo>Building Gitblit Manager ${gb.version}</echo>
-
- <genjar jarfile="${manager.jarfile}">
- <resource file="${basedir}/src/com/gitblit/client/splash.png" />
- <resource file="${basedir}/resources/gitblt-favicon.png" />
- <resource file="${basedir}/resources/gitweb-favicon.png" />
- <resource file="${basedir}/resources/user_16x16.png" />
- <resource file="${basedir}/resources/settings_16x16.png" />
- <resource file="${basedir}/resources/lock_go_16x16.png" />
- <resource file="${basedir}/resources/lock_pull_16x16.png" />
- <resource file="${basedir}/resources/shield_16x16.png" />
- <resource file="${basedir}/resources/federated_16x16.png" />
- <resource file="${basedir}/resources/cold_16x16.png" />
- <resource file="${basedir}/resources/book_16x16.png" />
- <resource file="${basedir}/resources/bug_16x16.png" />
- <resource file="${basedir}/resources/health_16x16.png" />
- <resource file="${basedir}/resources/feed_16x16.png" />
- <resource file="${basedir}/resources/bullet_feed.png" />
- <resource file="${basedir}/resources/blank.png" />
- <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
-
- <class name="com.gitblit.client.GitblitManagerLauncher" />
- <classfilter>
- <exclude name="org.apache." />
- <exclude name="org.bouncycastle." />
- <exclude name="org.eclipse." />
- <exclude name="org.slf4j." />
- <exclude name="com.beust." />
- <exclude name="com.google." />
- </classfilter>
- <classpath refid="master-classpath" />
- <manifest>
- <attribute name="Main-Class" value="com.gitblit.client.GitblitManagerLauncher" />
- <attribute name="SplashScreen-Image" value="splash.png" />
- <attribute name="Specification-Version" value="${gb.version}" />
- <attribute name="Release-Date" value="${gb.versionDate}" />
- </manifest>
- </genjar>
-
- </target>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the Gitblit API client library
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
- <echo>Building Gitblit API Library ${gb.version}</echo>
-
- <genjar jarfile="gbapi.jar">
- <class name="com.gitblit.client.GitblitClient" />
- <classpath refid="master-classpath" />
- <classfilter>
- <exclude name="com.google.gson." />
- </classfilter>
- <manifest>
- <attribute name="Specification-Version" value="${gb.version}" />
- <attribute name="Release-Date" value="${gb.versionDate}" />
- </manifest>
- </genjar>
-
- <!-- Build the API library zip file -->
- <zip destfile="${gbapi.zipfile}">
- <fileset dir="${basedir}">
- <include name="gbapi.jar" />
- </fileset>
- <fileset dir="${basedir}/ext">
- <include name="gson*.jar" />
- <exclude name="gson*-sources.jar" />
- <exclude name="gson*-javadoc.jar" />
- </fileset>
- </zip>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the Gitblit Website
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildSite" depends="compile" description="Build the Gitblit website">
-
- <echo>Building Gitblit Website ${gb.version}</echo>
-
- <!-- Build Site -->
- <delete dir="${project.site.dir}" />
- <mkdir dir="${project.site.dir}" />
- <copy todir="${project.site.dir}">
- <!-- Copy selected Gitblit resources -->
- <fileset dir="${project.resources.dir}">
- <include name="bootstrap.130.css" />
- <include name="bootstrap.gb.css" />
- <include name="markdown.css" />
- <include name="gitblt_25_white.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" />
- <include name="federated_16x16.png" />
- <include name="arrow_page.png" />
- </fileset>
-
- <!-- Copy Doc images -->
- <fileset dir="${basedir}/docs">
- <include name="*.png" />
- <include name="*.js" />
- </fileset>
- </copy>
-
- <!-- Copy Fancybox -->
- <mkdir dir="${project.site.dir}/fancybox" />
- <copy todir="${project.site.dir}/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="${project.site.dir}/prettify">
- <fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
- <exclude name="thumbs.db" />
- </fileset>
- </copy>
-
- <!-- Generate thumbnails of screenshots -->
- <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildThumbnails">
- <classpath refid="master-classpath" />
-
- <arg value="--sourceFolder" />
- <arg value="${basedir}/docs/screenshots" />
-
- <arg value="--destinationFolder" />
- <arg value="${project.site.dir}/thumbs" />
-
- <arg value="--maximumDimension" />
- <arg value="250" />
- </java>
-
- <!-- Copy screenshots -->
- <mkdir dir="${project.site.dir}/screenshots" />
- <copy todir="${project.site.dir}/screenshots">
- <fileset dir="${basedir}/docs/screenshots">
- <include name="*.png" />
- </fileset>
- </copy>
-
- <!-- Build site pages -->
- <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildSite">
- <classpath refid="master-classpath" />
- <arg value="--sourceFolder" />
- <arg value="${basedir}/docs" />
-
- <arg value="--outputFolder" />
- <arg value="${project.site.dir}" />
-
- <arg value="--pageHeader" />
- <arg value="${basedir}/docs/site_header.html" />
-
- <arg value="--pageFooter" />
- <arg value="${basedir}/docs/site_footer.html" />
-
- <arg value="--analyticsSnippet" />
- <arg value="${basedir}/docs/site_analytics.html" />
-
- <arg value="--adSnippet" />
- <arg value="${basedir}/docs/site_ads.html" />
-
- <arg value="--alias" />
- <arg value="index=overview" />
-
- <arg value="--alias" />
- <arg value="properties=settings" />
-
- <arg value="--substitute" />
- <arg value="%VERSION%=${gb.version}" />
-
- <arg value="--substitute" />
- <arg value="%GO%=${distribution.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%WAR%=${distribution.warfile}" />
-
- <arg value="--substitute" />
- <arg value="%FEDCLIENT%=${fedclient.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%MANAGER%=${manager.jarfile}" />
-
- <arg value="--substitute" />
- <arg value="%API%=${gbapi.zipfile}" />
-
- <arg value="--substitute" />
- <arg value="%BUILDDATE%=${gb.versionDate}" />
-
- <arg value="--substitute" />
- <arg value="%JGIT%=${jgit.version}" />
-
- <arg value="--properties" />
- <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
-
- <arg value="--nomarkdown" />
- <arg value="%BEGINCODE%:%ENDCODE%" />
-
- <arg value="--substitute" />
- <arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
-
- <arg value="--substitute" />
- <arg value="%ENDCODE%=</pre>" />
-
- <arg value="--regex" />
- <arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
-
- </java>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Compile from source, publish binaries, and build & deploy site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite">
- <!-- Cleanup -->
- <delete dir="${project.build.dir}" />
- <delete dir="${project.war.dir}" />
- <delete dir="${project.deploy.dir}" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish binaries to Google Code
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
-
- <echo>Uploading Gitblit ${gb.version} binaries</echo>
-
- <!-- Upload Gitblit GO ZIP file -->
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${distribution.zipfile}"
- targetfilename="gitblit-${gb.version}.zip"
- summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
- labels="Featured, Type-Package, OpSys-All" />
-
- <!-- Upload Gitblit WAR file -->
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${distribution.warfile}"
- targetfilename="gitblit-${gb.version}.war"
- summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
- labels="Featured, Type-Package, OpSys-All" />
-
- <!-- Upload Gitblit FedClient -->
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${fedclient.zipfile}"
- targetfilename="fedclient-${gb.version}.zip"
- summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
- labels="Featured, Type-Package, OpSys-All" />
-
- <!-- Upload Gitblit Manager -->
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${manager.jarfile}"
- targetfilename="manager-${gb.version}.jar"
- summary="Gitblit Manager v${gb.version} (Swing tool to remotely administer a Gitblit server)"
- labels="Featured, Type-Package, OpSys-All" />
-
- <!-- Upload Gitblit API Library -->
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${gbapi.zipfile}"
- targetfilename="gbapi-${gb.version}.zip"
- summary="Gitblit API Library v${gb.version} (JSON RPC library to integrate with your software)"
- labels="Featured, Type-Package, OpSys-All" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish site to hosting service
- You must add ext/commons-net-1.4.0.jar to your ANT classpath.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishSite" depends="buildSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
-
- <echo>Uploading Gitblit ${gb.version} website</echo>
-
- <ftp server="${ftp.server}"
- userid="${ftp.user}"
- password="${ftp.password}"
- remotedir="${ftp.dir}"
- passive="true"
- verbose="yes">
- <fileset dir="${project.site.dir}" />
- </ftp>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Compile from source, publish binaries, and build & deploy site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishAll" depends="publishBinaries,publishSite">
- <!-- Cleanup -->
- <delete dir="${project.build.dir}" />
- <delete dir="${project.war.dir}" />
- <delete dir="${project.deploy.dir}" />
- </target>
- </project>
|