chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r942751 - in /incubator/chemistry/opencmis/trunk/release-tool: ./ build.xml
Date Mon, 10 May 2010 14:31:44 GMT
Author: fmui
Date: Mon May 10 14:31:44 2010
New Revision: 942751

URL: http://svn.apache.org/viewvc?rev=942751&view=rev
Log:
added a small tool to build a release

Added:
    incubator/chemistry/opencmis/trunk/release-tool/
    incubator/chemistry/opencmis/trunk/release-tool/build.xml

Added: incubator/chemistry/opencmis/trunk/release-tool/build.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/release-tool/build.xml?rev=942751&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/release-tool/build.xml (added)
+++ incubator/chemistry/opencmis/trunk/release-tool/build.xml Mon May 10 14:31:44 2010
@@ -0,0 +1,478 @@
+<?xml version="1.0"?>
+
+    <!--
+        Licensed under the Apache License, Version 2.0 (the "License");
+        you may not use this file except in compliance with the License.
+        You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+        applicable law or agreed to in writing, software distributed
+        under the License is distributed on an "AS IS" BASIS, WITHOUT
+        WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+        See the License for the specific language governing permissions
+        and limitations under the License.
+    -->
+
+<project name="OpenCMIS Release" basedir="." default="usage">
+  <!-- release version -->
+  <property name="snapshot.version" value="0.1-incubating-SNAPSHOT" />
+  <property name="release.name" value="chemistry-opencmis" />
+  <property name="release.version" value="0.1-incubating" />
+  <property name="release.candidate" value="-RC0.1" />
+
+  <!-- scm -->
+  <property name="svn.connection" value="http://svn.apache.org/repos/asf/incubator/chemistry/opencmis/trunk"
/>
+
+  <!-- documentation -->
+  <property name="doc.start" value="http://incubator.apache.org/chemistry/index.html"
/>
+
+  <!-- directories -->
+  <property name="release.basedir" value="${basedir}" />
+  <property name="release.dir" value="${release.basedir}/release" />
+  <property name="svn.dir" value="${release.basedir}/svn" />
+  <property name="doc.dir" value="${release.basedir}/doc" />
+  <property name="pack.dir" value="${release.basedir}/pack" />
+
+  <!-- tools -->
+  <property name="svn.bin" value="svn" />
+  <property name="maven.bin" value="mvn.bat" />  
+  <property name="wget.bin" value="wget" />
+  <property name="gpg.bin" value="gpg" />
+
+  <!-- release files -->
+  <property name="release.file.source" value="${release.name}-${release.version}${release.candidate}-source"
/>
+  <property name="release.file.client" value="${release.name}-${release.version}${release.candidate}-client"
/>
+  <property name="release.file.client-dep" value="${release.name}-${release.version}${release.candidate}-client-dep"
/>
+  <property name="release.file.server" value="${release.name}-${release.version}${release.candidate}-server"
/>
+  <property name="release.file.inmemory" value="${release.name}-${release.version}${release.candidate}-server-inmemory"
/>
+  <property name="release.file.fileshare" value="${release.name}-${release.version}${release.candidate}-server-fileshare"
/>
+  <property name="release.file.browser" value="${release.name}-${release.version}${release.candidate}-browser"
/>
+
+  <!-- ============================= -->
+  <!-- usage -->
+  <!-- ============================= -->
+  <target name="usage">
+    <echo>prepare - fetches the code, changes the release version and downloads the
documentation</echo>
+    <echo>build   - runs the Maven build</echo>
+    <echo>pack    - creates the release packages</echo>
+  </target>
+  
+  <!-- ============================= -->
+  <!-- prepare -->
+  <!-- ============================= -->
+  <target name="prepare" depends="prepare-directories, prepare-checkout, prepare-documentation">
+  </target>
+
+  <target name="prepare-directories">
+    <!-- create directories -->
+    <delete dir="${release.dir}"/>
+    <mkdir dir="${release.dir}" />
+
+    <delete dir="${svn.dir}"/>
+    <mkdir dir="${svn.dir}" />
+
+    <delete dir="${doc.dir}"/>
+    <mkdir dir="${doc.dir}" />
+  </target>
+
+  <!-- ============================= -->
+  <!-- checkout -->
+  <!-- ============================= -->
+  <target name="prepare-checkout">
+    <!-- get the code -->
+    <exec executable="${svn.bin}">
+      <arg value="checkout" />
+      <arg value="${svn.connection}" />
+      <arg value="${svn.dir}" />
+    </exec>
+
+    <!-- change the release version -->
+    <replace dir="${svn.dir}" encoding="UTF-8" summary="true" value="&lt;version&gt;${release.version}${release.candidate}&lt;/version&gt;">
+      <include name="**/pom.xml"/>
+      <replacetoken expandProperties="true">&lt;version&gt;${snapshot.version}&lt;/version&gt;</replacetoken>
+    </replace>
+  </target>
+
+  <!-- ============================= -->
+  <!-- documentation -->
+  <!-- ============================= -->
+  <target name="prepare-documentation">
+    <!-- get the documentation -->
+    <exec executable="${wget.bin}">
+      <arg value="--directory-prefix=${doc.dir}" />
+      <arg value="--recursive" />
+      <arg value="--convert-links" />
+      <arg value="--include=/chemistry" />
+      <arg value="--accept=opencmis*,index.html,css,js,gif,png,jpg" />
+      <arg value="${doc.start}" />
+    </exec>
+
+    <!-- move it to the right place -->
+    <move todir="${doc.dir}">
+      <fileset dir="${doc.dir}/incubator.apache.org/chemistry"/>
+    </move>
+    <delete dir="${doc.dir}/incubator.apache.org"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- build -->
+  <!-- ============================= -->
+  <target name="build">
+    <!-- run Maven build -->
+    <exec executable="${maven.bin}" dir="${svn.dir}">
+      <arg value="clean" />
+      <arg value="install" />
+      <arg value="javadoc:aggregate" />
+      <arg value="assembly:assembly" />
+    </exec>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack -->
+  <!-- ============================= -->
+  <target name="pack" depends="pack-source, pack-client, pack-server, pack-browser">
+  </target>
+  
+  <!-- ============================= -->
+  <!-- pack source -->
+  <!-- ============================= -->
+  <target name="pack-source">
+    <!-- pack the source code -->
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <!-- copy everything -->
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+    
+    <copy todir="${pack.dir}/src">
+      <fileset dir="${svn.dir}">
+        <exclude name="LICENSE.txt"/>
+        <exclude name="NOTICE.txt"/>
+        <exclude name="**/.svn/**"/>
+        <exclude name="**/target/**"/>
+        <exclude name="**/_dev/**"/>
+        <exclude name="**/release-tools/**"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}/docs">
+        <fileset dir="${doc.dir}" />
+    </copy>
+
+    <copy todir="${pack.dir}/javadoc">
+        <fileset dir="${svn.dir}/target/site/apidocs" />
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.source}.zip" basedir="${pack.dir}" />
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.source}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.source}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.source}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.source}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.source}.tar.gz" />
+    </exec>
+    
+    <!-- clean up -->
+    <delete dir="${pack.dir}"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack client -->
+  <!-- ============================= -->
+  <target name="pack-client">
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-commons/chemistry-opencmis-commons-api/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-client/chemistry-opencmis-client-bindings/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-client/chemistry-opencmis-client-api/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-client/chemistry-opencmis-client-impl/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.client}.zip" basedir="${pack.dir}" />
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.client}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.client}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.client}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.client}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.client}.tar.gz" />
+    </exec>
+
+    <!-- use the current pack folder and add dependencies -->
+    <unzip dest="${pack.dir}">
+      <fileset dir="${svn.dir}/target">
+        <include name="*client*.zip"/>
+      </fileset>
+      <patternset>
+        <include name="*.jar"/>
+        <exclude name="chemistry-opencmis*"/>
+        <exclude name="junit*"/>
+      </patternset>
+    </unzip>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.client-dep}.zip" basedir="${pack.dir}"
/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.client-dep}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.client-dep}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.client-dep}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.client-dep}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.client-dep}.tar.gz" />
+    </exec>
+
+    <delete dir="${pack.dir}"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack server -->
+  <!-- ============================= -->
+  <target name="pack-server" depends="pack-server-server, pack-server-inmemory, pack-server-fileshare">
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack server server -->
+  <!-- ============================= -->
+  <target name="pack-server-server">
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+    
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-server/chemistry-opencmis-server-bindings/target">
+        <include name="*.war"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-server/chemistry-opencmis-server-support/target">
+        <include name="*.jar"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.server}.zip" basedir="${pack.dir}" />
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.server}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.server}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.server}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.server}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.server}.tar.gz" />
+    </exec>
+
+    <delete dir="${pack.dir}"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack server inmemory -->
+  <!-- ============================= -->
+  <target name="pack-server-inmemory">
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/target">
+        <include name="*.war"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.inmemory}.zip" basedir="${pack.dir}"
/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.inmemory}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.inmemory}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.inmemory}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.inmemory}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.inmemory}.tar.gz" />
+    </exec>
+
+    <delete dir="${pack.dir}"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack server fileshare -->
+  <!-- ============================= -->
+  <target name="pack-server-fileshare">
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/target">
+        <include name="*.war"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.fileshare}.zip" basedir="${pack.dir}"
/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.fileshare}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.fileshare}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.fileshare}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.fileshare}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.fileshare}.tar.gz" />
+    </exec>    
+
+    <delete dir="${pack.dir}"/>
+  </target>
+
+  <!-- ============================= -->
+  <!-- pack browser -->
+  <!-- ============================= -->
+  <target name="pack-browser">
+    <delete dir="${pack.dir}"/>
+    <mkdir dir="${pack.dir}" />
+
+    <copy todir="${pack.dir}" file="${svn.dir}/LICENSE.txt" />
+    <copy todir="${pack.dir}" file="${svn.dir}/NOTICE.txt" />
+    
+    <copy todir="${pack.dir}">
+      <fileset dir="${svn.dir}/chemistry-opencmis-test/chemistry-opencmis-test-browser-app/target">
+        <include name="*.war"/>
+        <exclude name="*sources*"/>
+      </fileset>
+    </copy>
+
+    <!-- create zip -->
+    <zip destfile="${release.dir}/${release.file.browser}.zip" basedir="${pack.dir}" />
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.browser}.zip.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.browser}.zip" />
+    </exec>
+
+    <!-- create tar.gz -->
+    <tar destfile="${release.dir}/${release.file.browser}.tar.gz" basedir="${pack.dir}"
compression="gzip"/>
+
+    <exec executable="${gpg.bin}" dir="${release.dir}">
+      <arg value="--armor" />
+      <arg value="--output" />
+      <arg value="${release.file.browser}.tar.gz.asc" />
+      <arg value="--detach-sig" />
+      <arg value="${release.file.browser}.tar.gz" />
+    </exec>
+
+    <delete dir="${pack.dir}"/>
+  </target>
+  
+</project>
\ No newline at end of file



Mime
View raw message