587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : build.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
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">
|
|
24 |
|
|
25 |
<property name="delivery.type" value="nokia" />
|
|
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)">
|
|
27 |
<ac:runtarget target="get-helium-revision" />
|
|
28 |
<mkdir dir="${publish.ci.dir}/${delivery.type}/${helium.revision}/" />
|
|
29 |
<copy file="${binary.delivery.zip}" todir="${publish.ci.dir}/${delivery.type}/${helium.revision}/" />
|
|
30 |
<echo file="${publish.ci.dir}/${delivery.type}/${helium.revision}/tickler.txt" message="done" />
|
|
31 |
</target>
|
|
32 |
|
|
33 |
<target name="cleanup-publish-dir" if="publish.ci.dir">
|
|
34 |
<tstamp>
|
|
35 |
<format property="before.date" pattern="MM/dd/yyyy hh:mm aa" offset="-1" unit="day"/>
|
|
36 |
</tstamp>
|
|
37 |
<echo>Deleting files before: ${before.date}</echo>
|
|
38 |
<delete>
|
|
39 |
<fileset dir="${publish.ci.dir}">
|
|
40 |
<date datetime="${before.date}" when="before" />
|
|
41 |
</fileset>
|
|
42 |
</delete>
|
|
43 |
</target>
|
|
44 |
|
|
45 |
<target name="create-sf-source-delivery" description="Create the SF source delivery">
|
|
46 |
<mkdir dir="${build.temp.dir}" />
|
|
47 |
<delete file="${sf.delivery.zip}" failonerror="false" />
|
|
48 |
<zip destfile="${sf.delivery.zip}">
|
|
49 |
<zipfileset dir="${source.root.dir}" prefix="helium">
|
|
50 |
<include name="**/*" />
|
|
51 |
<exclude name="build/**" />
|
|
52 |
<exclude name="**/distribution.policy.S60" />
|
|
53 |
<exclude name="builder/antlibs/cachedir/**" />
|
|
54 |
<exclude name="external/antlibs/**" />
|
|
55 |
<exclude name="external/antlibs2/**" />
|
|
56 |
<exclude name="external/python/configure_jython.*" />
|
|
57 |
<exclude name="external/python/lib/auto/**" />
|
|
58 |
<scriptselector language="jython">
|
|
59 |
try:
|
|
60 |
if file.isDirectory():
|
|
61 |
value = open(file.toString() + "/distribution.policy.S60").read().strip().strip('\n')
|
|
62 |
else:
|
|
63 |
value = open(file.getParent() + "/distribution.policy.S60").read().strip().strip('\n')
|
|
64 |
if value == '7':
|
|
65 |
#self.log("Selecting %s" % file)
|
|
66 |
self.setSelected(True)
|
|
67 |
else:
|
|
68 |
self.setSelected(False)
|
|
69 |
except:
|
|
70 |
print "distribution.policy.S60 is missing for %s" % file
|
|
71 |
self.setSelected(False)
|
|
72 |
</scriptselector>
|
|
73 |
</zipfileset>
|
|
74 |
</zip>
|
|
75 |
</target>
|
|
76 |
|
|
77 |
<target name="create-sf-delivery" depends="create-sf-source-delivery">
|
|
78 |
<delete dir="${build.temp.dir}/sf_helium" failonerror="false" />
|
|
79 |
<mkdir dir="${build.temp.dir}/sf_helium" />
|
|
80 |
<unzip src="${sf.delivery.zip}" dest="${build.temp.dir}/sf_helium" />
|
|
81 |
<exec osfamily="windows" executable="cmd" dir="${build.temp.dir}/sf_helium/helium/builder">
|
|
82 |
<arg value="/C" />
|
|
83 |
<arg value="bld.bat" />
|
|
84 |
<arg value="build" />
|
|
85 |
</exec>
|
|
86 |
<exec osfamily="windows" executable="cmd" dir="${build.temp.dir}/sf_helium/helium/builder">
|
|
87 |
<arg value="/C" />
|
|
88 |
<arg value="bld.bat" />
|
|
89 |
<arg value="-Dconfig=sf" />
|
|
90 |
<arg value="create-releasable" />
|
|
91 |
</exec>
|
|
92 |
</target>
|
|
93 |
|
|
94 |
<target name="get-latest-delivery">
|
|
95 |
<mkdir dir="${build.temp.dir}/temp" />
|
|
96 |
<basename file="${binary.delivery.zip}" property="binary.delivery.basename" />
|
|
97 |
<copy todir="${build.temp.dir}/temp" verbose="true">
|
588
|
98 |
<first>
|
|
99 |
<sort>
|
|
100 |
<reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
|
|
101 |
<date />
|
|
102 |
</reverse>
|
|
103 |
<fileset dir="${publish.ci.dir}/${delivery.type}">
|
|
104 |
<include name="*/${binary.delivery.basename}" />
|
|
105 |
<scriptselector language="jython">
|
587
|
106 |
<![CDATA[
|
|
107 |
try:
|
|
108 |
open(file.getParent() + "/tickler.txt").close()
|
588
|
109 |
self.setSelected(True)
|
587
|
110 |
except:
|
|
111 |
print "No ticker file for %s" % file
|
|
112 |
self.setSelected(False)
|
|
113 |
]]>
|
588
|
114 |
</scriptselector>
|
|
115 |
</fileset>
|
|
116 |
</sort>
|
|
117 |
</first>
|
587
|
118 |
<flattenmapper/>
|
|
119 |
</copy>
|
|
120 |
<unzip src="${build.temp.dir}/temp/${binary.delivery.basename}" dest="${build.temp.dir}/temp" />
|
|
121 |
</target>
|
588
|
122 |
|
|
123 |
<target name="get-latest-sf-delivery">
|
|
124 |
<antcall target="get-latest-delivery">
|
|
125 |
<param name="delivery.type" value="sf"/>
|
|
126 |
</antcall>
|
|
127 |
</target>
|
|
128 |
|
587
|
129 |
</project> |