]> source.dussan.org Git - gitblit.git/commitdiff
Gitblit GO artefacts use release name for root directory. 09/109/2
authorAlex Lewis <alex.lewis001@gmail.com>
Wed, 18 Jun 2014 11:36:07 +0000 (12:36 +0100)
committerJames Moger <james.moger@gitblit.com>
Tue, 1 Jul 2014 03:01:50 +0000 (23:01 -0400)
build.xml

index fa02ee32226436a297b3a2f6e849bdbd87dea862..c88bd8fda46129bd018e2cae653d3b2dfa075bb8 100644 (file)
--- a/build.xml
+++ b/build.xml
                <mx:init verbose="no" mxroot="${moxie.dir}" />\r
                                \r
                <!-- Set Ant project properties -->\r
-               <property name="distribution.zipfile" value="gitblit-${project.version}.zip" />\r
-               <property name="distribution.tgzfile" value="gitblit-${project.version}.tar.gz" />\r
-               <property name="distribution.warfile" value="gitblit-${project.version}.war" />\r
+               <property name="release.name" value="gitblit-${project.version}"/>\r
+               <property name="distribution.zipfile" value="${release.name}.zip" />\r
+               <property name="distribution.tgzfile" value="${release.name}.tar.gz" />\r
+               <property name="distribution.warfile" value="${release.name}.war" />\r
                <property name="fedclient.zipfile" value="fedclient-${project.version}.zip" />\r
                <property name="manager.zipfile" value="manager-${project.version}.zip" />\r
                <property name="authority.zipfile" value="authority-${project.version}.zip" />\r
                \r
                <echo>Building Gitblit GO ${project.version}</echo>\r
 \r
-               <local name="go.dir" />\r
-               <property name="go.dir" value="${project.outputDirectory}/go" />        \r
+               <local name="go.dir"/>\r
+               <property name="go.dir" value="${project.outputDirectory}/go"/>\r
                <delete dir="${go.dir}" />\r
+               \r
+               <local name="go.release.dir" />\r
+               <property name="go.release.dir" value="${go.dir}/${release.name}" />    \r
 \r
                <local name="webinf" />\r
                <property name="webinf" value="${project.compileOutputDirectory}/WEB-INF" />\r
 \r
-               <prepareDataDirectory toDir="${go.dir}/data" />\r
+               <prepareDataDirectory toDir="${go.release.dir}/data" />\r
                \r
                <!-- Copy the web.xml from the prototype web.xml -->\r
                <copy todir="${webinf}" overwrite="true">\r
                </copy>\r
                \r
                <!-- Build jar -->\r
-               <mx:jar destfile="${go.dir}/gitblit.jar" includeresources="true">\r
+               <mx:jar destfile="${go.release.dir}/gitblit.jar" includeresources="true">\r
                        <mainclass name="com.gitblit.GitBlitServer" />\r
                        <launcher paths="ext" />\r
                </mx:jar>\r
 \r
                <!-- Generate the docs for the GO build -->\r
-               <generateDocs toDir="${go.dir}/docs" />\r
-               \r
+               <generateDocs toDir="${go.release.dir}/docs" />\r
+\r
                <!-- Create GO Windows Zip deployment -->\r
                <mx:zip basedir="${go.dir}">\r
                        <!-- LICENSE and NOTICE -->\r
-                       <fileset dir="${basedir}" >\r
+                       <zipfileset dir="${basedir}" prefix="${release.name}">\r
                                <include name="LICENSE" />\r
                                <include name="NOTICE" />\r
-                       </fileset>\r
+                       </zipfileset>\r
                        <!-- Windows distrib files -->\r
-                       <zipfileset dir="${project.distrib.dir}/win" />\r
+                       <zipfileset dir="${project.distrib.dir}/win" prefix="${release.name}"/>\r
                        <!-- Gitblit Authority data -->\r
-                       <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />\r
+                       <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />\r
+\r
                        <!-- include all dependencies -->\r
-                       <dependencies prefix="ext" />\r
+                       <dependencies prefix="${release.name}/ext" />\r
                </mx:zip>\r
 \r
                <!-- Create GO Linux/OSX tar.gz deployment -->\r
                <mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">\r
                        <!-- LICENSE and NOTICE -->\r
-                       <fileset dir="${basedir}" >\r
+                       <zipfileset dir="${basedir}" prefix="${release.name}">\r
                                <include name="LICENSE" />\r
                                <include name="NOTICE" />\r
-                       </fileset>\r
+                       </zipfileset>\r
                        <!-- Linux/OSX distrib files -->\r
-                       <tarfileset dir="${project.distrib.dir}/linux" filemode="755" />\r
+                       <tarfileset dir="${project.distrib.dir}/linux" filemode="755" prefix="${release.name}"/>\r
                        <!-- Gitblit Authority data -->\r
-                       <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />\r
+                       <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />\r
                        <!-- include all dependencies -->\r
-                       <dependencies prefix="ext" />\r
+                       <dependencies prefix="${release.name}/ext" />\r
                </mx:tar>               \r
 \r
        </target>\r