buildframework/helium/builder/delivery.ant.xml
author srilekhas <srilekhas@symbian.org>
Wed, 18 Aug 2010 11:18:38 +0100
changeset 627 cb3264f4c6e6
parent 588 c7c26511138f
child 628 7c4a911dc066
permissions -rw-r--r--
Merge : re-applies missing part of fix for Bug 2901,Add export for s60ibymacros.pm
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">
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    98
            <first>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    99
                <sort>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   100
                    <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   101
                        <date />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   102
                    </reverse>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   103
                    <fileset dir="${publish.ci.dir}/${delivery.type}">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   104
                        <include name="*/${binary.delivery.basename}" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   105
                        <scriptselector language="jython">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
<![CDATA[
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
try:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
    open(file.getParent() + "/tickler.txt").close()
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   109
    self.setSelected(True)
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   110
except:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   111
    print "No ticker file for %s" % file
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
    self.setSelected(False)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
]]>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   114
                        </scriptselector>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   115
                    </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   116
                </sort>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   117
            </first>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
            <flattenmapper/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   119
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   120
        <unzip src="${build.temp.dir}/temp/${binary.delivery.basename}" dest="${build.temp.dir}/temp" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   121
    </target>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   122
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   123
    <target name="get-latest-sf-delivery">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   124
        <antcall target="get-latest-delivery">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   125
            <param name="delivery.type" value="sf"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   126
        </antcall>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   127
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   128
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   129
</project>