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">
|
|
98 |
<fileset dir="${publish.ci.dir}/${delivery.type}">
|
|
99 |
<include name="*/${binary.delivery.basename}" />
|
|
100 |
<scriptselector language="jython">
|
|
101 |
<![CDATA[
|
|
102 |
try:
|
|
103 |
open(file.getParent() + "/tickler.txt").close()
|
|
104 |
myrev = int(file.getParentFile().getName())
|
|
105 |
selected = True
|
|
106 |
for f in file.getParentFile().getParentFile().listFiles():
|
|
107 |
try:
|
|
108 |
if myrev < int(f.getName()):
|
|
109 |
selected = False
|
|
110 |
except:
|
|
111 |
pass
|
|
112 |
self.setSelected(selected)
|
|
113 |
except:
|
|
114 |
print "No ticker file for %s" % file
|
|
115 |
self.setSelected(False)
|
|
116 |
]]>
|
|
117 |
</scriptselector>
|
|
118 |
</fileset>
|
|
119 |
<flattenmapper/>
|
|
120 |
</copy>
|
|
121 |
<unzip src="${build.temp.dir}/temp/${binary.delivery.basename}" dest="${build.temp.dir}/temp" />
|
|
122 |
</target>
|
|
123 |
</project> |