incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1373536 - in /incubator/flex/utilities/InstallApacheFlex: build.properties build.xml
Date Wed, 15 Aug 2012 17:36:29 GMT
Author: cframpton
Date: Wed Aug 15 17:36:28 2012
New Revision: 1373536

URL: http://svn.apache.org/viewvc?rev=1373536&view=rev
Log:
Add release, source-package and binary-package targets.  Add ${COMMON_SOURCE_DIR} to source
path so app will compile.  distros currently land in release since that directory already
existed but this differs from trunk where they land in out so we may want to make this consistent.

Modified:
    incubator/flex/utilities/InstallApacheFlex/build.properties
    incubator/flex/utilities/InstallApacheFlex/build.xml

Modified: incubator/flex/utilities/InstallApacheFlex/build.properties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/build.properties?rev=1373536&r1=1373535&r2=1373536&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/build.properties (original)
+++ incubator/flex/utilities/InstallApacheFlex/build.properties Wed Aug 15 17:36:28 2012
@@ -44,6 +44,7 @@ ASSETS_DIR=${basedir}/src/assets
 LIBRARY_DIR=${basedir}/libs
 RELEASE_DIR=${basedir}/release
 BUILD_DIR=${basedir}/build
+COMMON_SOURCE_DIR=${basedir}/../ApacheFlexUtilitiesCommon/src
 
 #Etc Settings
 DEBUG_FLAG=false

Modified: incubator/flex/utilities/InstallApacheFlex/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/build.xml?rev=1373536&r1=1373535&r2=1373536&view=diff
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/build.xml (original)
+++ incubator/flex/utilities/InstallApacheFlex/build.xml Wed Aug 15 17:36:28 2012
@@ -27,6 +27,11 @@
     <property file="${basedir}/build.properties" description="Properties for MakeApacheFlexForFlashBuilder
project" />
     <property file="${basedir}/build.number"/>
 
+    <property name="installer.version" value="${release.version}.${build.number}"/>
+    <property name="kit.prefix" value="apache-flex-sdk-installer-${installer.version}-incubating"/>
+    <property name="source.kit" value="${kit.prefix}-src"/>
+    <property name="binary.kit" value="${kit.prefix}-bin"/>
+
     <!-- properties are immutable so value frozen first time property is set -->
     <condition property="FLEX_HOME" value="${FLEX_HOME_WIN}">
         <os family="windows"/>
@@ -68,7 +73,10 @@
 
     <target name="build" depends="init,compile,packagenative,cleanup" 
         description="Compiles and packages application"/>
-    
+
+    <target name="release" depends="build,source-package,binary-package"
+        description="Build the application and package up the distros for release."/>
+        
     <target name="init" depends="clean,createDirs,update-app-xml,create-version-xml" 
         description="Creates the deploy folders and sets app extension"/>
         
@@ -94,10 +102,10 @@
 
     <!-- Make sure version, esp, build.number, in APP_NAME-app.xml is in sync.  -->
     <target name="update-app-xml" description="Update version in APP_NAME-app.xml.">
-        <echo message="version in ${APP_NAME}-app.xml will be ${release.version}.${build.number}"/>
+        <echo message="version in ${APP_NAME}-app.xml will be ${installer.version}"/>
         <replaceregexp byline="true">
             <regexp pattern="&lt;versionNumber&gt;(\d+\.)?(\d+\.)?(\d+)&lt;/versionNumber&gt;"/>
-            <substitution expression="&lt;versionNumber&gt;${release.version}.${build.number}&lt;/versionNumber&gt;"/>
+            <substitution expression="&lt;versionNumber&gt;${installer.version}&lt;/versionNumber&gt;"/>
             <fileset dir="${SOURCE_DIR}">
                 <include name="${APP_NAME}-app.xml"/>
             </fileset>
@@ -150,6 +158,7 @@
             fork="true"
             maxmemory="512m">
             <source-path path-element="${SOURCE_DIR}"/>
+            <source-path path-element="${COMMON_SOURCE_DIR}"/>
             <external-library-path file="${FLEX_HOME}/frameworks/libs/air/airglobal.swc"
append="true"/>
             <library-path dir="${LIBRARY_DIR}" includes="*.swc" append="true"/>
             <define name="INSTALLER::releaseVersion" value="${release.version}"/> 
@@ -206,7 +215,7 @@
     </target>
     
     <target name="create-version-xml" description="Creates version.xml file for update">
-        <echo message="version in version.xml will be ${release.version}.${build.number}"/>
+        <echo message="version in version.xml will be ${installer.version}"/>
         <echo file="${RELEASE_DIR}/version.xml">&lt;?xml version="1.0"?&gt;
 &lt;!--
 
@@ -232,11 +241,57 @@
     &lt;!-- The URL to download the Mac installer from --&gt;
     &lt;urlMac&gt;${installer.url.mac}&lt;/urlMac&gt;
     &lt;!-- The version from ${APP_NAME}-app.xml --&gt;
-    &lt;version&gt;${release.version}.${build.number}&lt;/version&gt;
+    &lt;version&gt;${installer.version}&lt;/version&gt;
     &lt;description&gt;Latest release&lt;/description&gt;
     &lt;required&gt;true&lt;/required&gt;
 &lt;/update&gt;
         </echo>
     </target>
 
-</project>
\ No newline at end of file
+    <!-- 
+        Packages the source distribution with ZIP and TAR_GZIP.
+        The source file line endings match the package type.
+    -->
+    <target name="source-package" description="Package source files.">
+        
+        <mkdir dir="${BUILD_DIR}/temp"/>
+        <copy todir="${BUILD_DIR}/temp" includeEmptyDirs="false">
+            <fileset dir="${basedir}">
+                <exclude name="release/**"/>
+            </fileset>
+        </copy>
+        
+        <fixcrlf srcdir="${BUILD_DIR}/temp" eol="crlf"/>
+
+        <mkdir dir="${RELEASE_DIR}"/>
+        <zip destfile="${RELEASE_DIR}/${source.kit}.zip" 
+            basedir="${BUILD_DIR}/temp"/>
+        
+        <fixcrlf srcdir="${BUILD_DIR}/temp" eol="unix"/>
+
+        <tar destfile="${RELEASE_DIR}/${source.kit}.tar.gz" 
+            compression="gzip"
+            basedir="${BUILD_DIR}/temp"/>
+        
+        <delete dir="${BUILD_DIR}/temp"/>
+    </target>
+
+    <!-- 
+        Packages the binary distribution with ZIP and TAR_GZIP.
+    -->
+    <target name="binary-package" description="Package binary files.">      
+        <mkdir dir="${RELEASE_DIR}"/>
+        
+        <zip destfile="${RELEASE_DIR}/${binary.kit}.zip">
+            <fileset dir="${basedir}/release">
+                <exclude name="**/*.zip"/>
+                <exclude name="**/*.tar*"/>
+            </fileset>
+        </zip>
+
+        <tar destfile="${RELEASE_DIR}/${binary.kit}.tar.gz" compression="gzip">
+          <zipfileset src="${RELEASE_DIR}/${binary.kit}.zip"/>
+        </tar>
+    </target>
+
+</project>



Mime
View raw message