buildframework/helium/tools/release/release.ant.xml
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
--- a/buildframework/helium/tools/release/release.ant.xml	Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/tools/release/release.ant.xml	Fri Aug 13 14:59:05 2010 +0300
@@ -69,6 +69,39 @@
     @editable required
     @scope public
     -->
+    
+    <!--* @property robot.release.enabled
+    Set to true to do build robot release after completing the build and if it successful.
+    @type boolean
+    @editable required
+    @scope public
+    @since 11.0
+    -->
+    
+    <!--* @property do.robot.release
+    Set to synergy project name to doing the build robot release. - deprecated: Start using robot.release.enabled property.
+    @type string
+    @editable required
+    @scope public
+    @deprecated since 11.0
+    -->
+    
+    <!--* @property internal.robot.release.enabled
+    Internal property to run the robot release property if robot.release.enabled set to true. 
+    @type string
+    @scope private
+    -->
+    
+    <!-- Check, is robot release is enabled -->
+    <condition property="internal.robot.release.enabled">
+        <and>
+            <or>
+                <istrue value="${robot.release.enabled}"/>
+                <isset property="do.robot.release"/>
+            </or>
+            <isset property="s60.build.robot.path"/>
+        </and>    
+    </condition>
 
     <fileset id="release.files" dir="${publish.dir}">
         <include name="logs/**/*" />
@@ -101,12 +134,15 @@
     @editable required
     @scope public
     -->
-
-    <!--
-        This target sets the '''do.robot.release''' property so it activates 
-        the '''ido-sources-to-s60-build-robot''' target.
+    
+    <!--* @property robot.release.project
+    Synergy project name to be delivered onto build robot.
+    @type string
+    @scope private
     -->
-    <target name="check-robot-release" if="s60.build.robot.path">
+    
+    <!-- Will check is it required to do the sources release to build robot using the property  s60.build.robot.date -->
+    <target name="check-robot-release" if="internal.robot.release.enabled">
         <script language="jython" setbeans="false">
             <![CDATA[
 self.setTaskName("check-robot-release")
@@ -121,7 +157,7 @@
             if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]):
                 self.log("It is release time!")
                 projects.append(config[4])
-                project.setProperty('do.robot.release', ",".join(projects))
+                project.setProperty('robot.release.project', ",".join(projects))
             else:
                 self.log("It is not release time!")
         except Exception, e:
@@ -137,31 +173,39 @@
     zip them all and send to the specified location. There is only one but mandatory 
     property to tell the location of the build server which is "s60.build.robot.path".
     -->
-    <target name="ido-sources-to-s60-build-robot" if="do.robot.release" depends="ido-create-ado-mapping,check-robot-release,lookup-email">
-        <!-- Location of the ready.txt FMPP template (override that property if you want to customize the content).
-        @type string
-        @scope private
-        -->
-        <property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" />
-        <tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" />
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
-            <data expandProperties="yes">
-                    inputfile: antProperty(ado.mapping.file)
-                    ant: antProperties()
-                    data: eval('
-                                            java.io.FileInputStream pin = new java.io.FileInputStream(filename);
-                                            java.util.Properties props = new java.util.Properties();
-                                            props.load(pin);
-                        return props;
-                            ', {filename: get(inputfile)})
-            </data>
-        </fmpp>
-        <ant antfile="${s60robot.dynamic.config}" target="all" />
-        <fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt">
-            <data expandProperties="yes">
-                ant: antProperties()
-            </data>
-        </fmpp>
+    <target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="ido-create-ado-mapping,check-robot-release,lookup-email">
+        <if>
+            <isset property="robot.release.project"/>
+            <then>
+                <!-- Location of the ready.txt FMPP template (override that property if you want to customize the content).
+                @type string
+                @scope private
+                -->
+                <property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" />
+                <tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" />
+                <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
+                    <data expandProperties="yes">
+                            inputfile: antProperty(ado.mapping.file)
+                            ant: antProperties()
+                            data: eval('
+                                java.io.FileInputStream pin = new java.io.FileInputStream(filename);
+                                java.util.Properties props = new java.util.Properties();
+                                props.load(pin);
+                                return props;
+                                    ', {filename: get(inputfile)})
+                    </data>
+                </fmpp>
+                <ant antfile="${s60robot.dynamic.config}" target="all" />
+                <fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt">
+                    <data expandProperties="yes">
+                        ant: antProperties()
+                    </data>
+                </fmpp>
+            </then>
+            <else>
+                <echo>It is not release time!</echo>
+            </else>
+        </if>
     </target>
 
 </project>