buildframework/helium/builder/delivery.ant.xml
author wbernard
Thu, 22 Jul 2010 17:09:34 +0300
branchhelium-9.0
changeset 619 f5b4d1b4622d
parent 587 85df38eb4012
child 588 c7c26511138f
permissions -rw-r--r--
Added tag helium-9.0.5 for changeset df88fead2976
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : build.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="delivery" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    <property name="delivery.type" value="nokia" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <target name="publish-releasable" if="publish.ci.dir" description="Publish the releasble package on a shared drived (must be built from a Mercurial clone)">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
        <ac:runtarget target="get-helium-revision" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
        <mkdir dir="${publish.ci.dir}/${delivery.type}/${helium.revision}/" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
        <copy file="${binary.delivery.zip}" todir="${publish.ci.dir}/${delivery.type}/${helium.revision}/" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
        <echo file="${publish.ci.dir}/${delivery.type}/${helium.revision}/tickler.txt" message="done" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
  
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
    <target name="cleanup-publish-dir" if="publish.ci.dir">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
        <tstamp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
            <format property="before.date" pattern="MM/dd/yyyy hh:mm aa" offset="-1" unit="day"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
        </tstamp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
        <echo>Deleting files before: ${before.date}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
        <delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
            <fileset dir="${publish.ci.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
                <date datetime="${before.date}" when="before" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
            </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
        </delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    <target name="create-sf-source-delivery" description="Create the SF source delivery">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
        <mkdir dir="${build.temp.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
        <delete file="${sf.delivery.zip}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
        <zip destfile="${sf.delivery.zip}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
            <zipfileset dir="${source.root.dir}" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
                <include name="**/*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
                <exclude name="build/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
                <exclude name="builder/antlibs/cachedir/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
                <exclude name="external/antlibs/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
                <exclude name="external/antlibs2/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
                <exclude name="external/python/configure_jython.*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
                <exclude name="external/python/lib/auto/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
                <scriptselector language="jython">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
try:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
    if file.isDirectory():
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        value = open(file.toString() + "/distribution.policy.S60").read().strip().strip('\n')
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
    else:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
        value = open(file.getParent() + "/distribution.policy.S60").read().strip().strip('\n')
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
    if value == '7':
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
        #self.log("Selecting %s" % file)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
        self.setSelected(True)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
    else:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
        self.setSelected(False)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
except:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
    print "distribution.policy.S60 is missing for %s" % file
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
    self.setSelected(False)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
                </scriptselector>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
        </zip>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
    <target name="create-sf-delivery" depends="create-sf-source-delivery">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
        <delete dir="${build.temp.dir}/sf_helium" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
        <mkdir dir="${build.temp.dir}/sf_helium" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
        <unzip src="${sf.delivery.zip}" dest="${build.temp.dir}/sf_helium" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
        <exec osfamily="windows" executable="cmd" dir="${build.temp.dir}/sf_helium/helium/builder">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
            <arg value="/C" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
            <arg value="bld.bat" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
            <arg value="build" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
        <exec osfamily="windows" executable="cmd" dir="${build.temp.dir}/sf_helium/helium/builder">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
            <arg value="/C" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
            <arg value="bld.bat" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
            <arg value="-Dconfig=sf" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
            <arg value="create-releasable" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
    <target name="get-latest-delivery">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
        <mkdir dir="${build.temp.dir}/temp" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
        <basename file="${binary.delivery.zip}" property="binary.delivery.basename" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
        <copy todir="${build.temp.dir}/temp" verbose="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
            <fileset dir="${publish.ci.dir}/${delivery.type}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
                <include name="*/${binary.delivery.basename}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
                <scriptselector language="jython">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
<![CDATA[
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   102
try:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   103
    open(file.getParent() + "/tickler.txt").close()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
    myrev = int(file.getParentFile().getName())
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
    selected = True
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
    for f in file.getParentFile().getParentFile().listFiles():
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
        try:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
            if myrev < int(f.getName()):
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
                selected = False
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   110
        except:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   111
            pass
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
    self.setSelected(selected)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
except:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   114
    print "No ticker file for %s" % file
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   115
    self.setSelected(False)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   116
]]>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   117
                </scriptselector>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
            </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   119
            <flattenmapper/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   120
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   121
        <unzip src="${build.temp.dir}/temp/${binary.delivery.basename}" dest="${build.temp.dir}/temp" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   122
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   123
</project>