buildframework/helium/tools/relnotes/relnotes.ant.xml
author Richard Taylor <richard.i.taylor@nokia.com>
Mon, 29 Mar 2010 14:56:03 +0100
branchfix
changeset 417 ea9157619e03
parent 217 0f5e3a7fb6af
child 587 85df38eb4012
permissions -rw-r--r--
release note: do not allow data to be paged implicitly
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : relnotes.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    23
<!--* @package releases -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="relnotes" default="release-notes" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
    Generates a release note by modifying a template (that you can edit yourself) with
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
    values from the build and Synergy.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
    * Modifies a RTF template with values from build
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    30
    * Adds table of errors and warnings
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    * Generates list of baselines, projects and tasks used
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
    </description>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    <!--* @property product.printname
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    A printable name for a product used in release notes.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    36
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    37
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    <!--* @property product.type
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
    Project ID in release notes.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    47
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
    <!--* @property relnotes.config.dir
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    Defines the directory that contains release notes creation configuration files.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    52
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    54
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
    <!-- Defines the directory that will contain the output of release notes creation.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    57
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    59
    <property name="releasenotes.output.dir" value="${build.output.dir}/relnotes"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
    <!-- Defines the logo image file which will be used in release notes.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    61
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    62
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    63
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    64
    <property name="releasenotes.logo" value="${relnotes.config.dir}/logo.png"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    65
    <!-- Property file with customer values
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    66
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    67
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    68
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    69
    <property name="releasenotes.props" value="${relnotes.config.dir}/relnotes.properties"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    70
    <!-- Temp file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    71
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    72
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    73
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    74
    <property name="releasenotes.temp.props" value="${temp.build.dir}/relnotes.properties"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
    <!-- Temp file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    76
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    77
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    78
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    79
    <property name="releasenotes.temp.props2" value="${temp.build.dir}/relnotes2.properties"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    80
    <!-- Defines the name of the release note template used.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    81
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    82
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    83
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    84
    <property name="releasenotes.template" value="${relnotes.config.dir}/template.rtf"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    85
    <!-- Location of output rtf file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    86
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    87
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    88
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    89
    <property name="releasenotes.output" value="${releasenotes.output.dir}/${build.id}_relnotes.rtf"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    90
    <!-- Temp file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    91
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    92
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    93
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    94
    <property name="releasenotes.temp.errors" value="${temp.build.dir}/errors.csv"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    95
    <!-- Temp file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    96
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    97
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    98
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    99
    <property name="releasenotes.temp.output" value="${temp.build.dir}/tempDocument.rtf"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   100
    <!-- Location of scan2log HTML file
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   101
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   102
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   103
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   104
    <property name="releasenotes.scan2log" value="${build.log.dir}/${build.id}.${product.family}_scan2.html"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   105
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   106
    <import file="${relnotes.config.dir}/relnotes_properties.ant.xml" optional="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   107
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   108
    <!-- @scope private -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   109
    <target name="release-notes-variant-configuration" depends="imaker-merge-rom-xml">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   110
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
tagnames = ""
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   112
for product in project.getProperty("product.list").split(","):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   113
    tagnames += "Type%sVariantTableHere\n" %  product 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   114
project.setProperty("variant.product.tagnames", tagnames)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   115
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   116
        <replace file="${releasenotes.output}" token="TypeVariantTableHere" value="${variant.product.tagnames}" summary="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   117
        <for list="${product.list}" delimiter="," param="product.name" >
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
            <sequential>            
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   119
                <exec executable="python" failonerror="${failonerror}">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   120
                    <arg line="-m getVariantConfiguration"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   121
                    <arg value="@{product.name}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   122
                    <arg value="${rombuild.config.file.parsed}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   123
                    <arg value="${temp.build.dir}/variant_@{product.name}.csv"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   124
                </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   125
                <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   126
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   127
import rtfutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   128
rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   129
rn.rtftable(ant.get_property(r'${temp.build.dir}/variant_@{product.name}.csv'), ant.get_property(r'${releasenotes.temp.output}'), ant.get_property(r'Type@{product.name}VariantTableHere'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   130
                </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   131
  
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   132
                <delete file="${releasenotes.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   133
                <move file="${releasenotes.temp.output}" tofile="${releasenotes.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   134
            </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   135
        </for>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   136
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   137
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   138
    <!-- Create error list in release notes
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   139
    @scope private    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   140
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   141
    <target name="release-notes-error-summary">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   142
        <fmpp sourceFile="${helium.dir}/tools/relnotes/templates/errors.csv.ftl"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   143
                     outputfile="${releasenotes.temp.errors}">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   144
            <freemarkerLinks expandProperties="yes">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   145
                macro: ${helium.dir}/tools/common/templates/macro
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   146
            </freemarkerLinks>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   147
            <data expandProperties="yes">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   148
                dbPath: ${metadata.dbfile}
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   149
                ant: antProperties()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   150
            </data>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   151
        </fmpp>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   152
        <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   153
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   154
import rtfutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   155
rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   156
rn.rtftable(ant.get_property(r'${releasenotes.temp.errors}'), ant.get_property(r'${releasenotes.temp.output}'), 'TypeErrorTableSummaryHere')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   157
        </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   158
        <delete file="${releasenotes.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   159
        <move file="${releasenotes.temp.output}" tofile="${releasenotes.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   160
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   161
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   162
    <!--  Add logo to release notes. @scope private -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   163
    <target name="release-notes-logo">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   164
        <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   165
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   166
import rtfutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   167
rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   168
rn.rtfimage(ant.get_property(r'${releasenotes.logo}'), ant.get_property(r'${releasenotes.temp.output}'), 'AddProductImageHere')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   169
        </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   170
        <move file="${releasenotes.temp.output}" tofile="${releasenotes.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   171
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   172
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   173
    <!-- Find project and baseline of what is running helium
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   174
    @scope private    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   175
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   176
    <target name="release-notes-getcmprojectname">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   177
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   178
            <istrue value="${ccm.enabled}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   179
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   180
                <script language="jython" setbeans="false">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   181
import ccm.extra
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   182
import traceback
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   183
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   184
import logging
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   185
import ccmutil
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   186
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   187
#logging.basicConfig(level=logging.DEBUG)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   188
session = None
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   189
try:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   190
    database = project.getProperty('ccm.database')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   191
    username = project.getProperty('ccm.user.login')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   192
    password = project.getProperty('ccm.user.password')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   193
    engine = project.getProperty('ccm.engine.host')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   194
    dbpath = project.getProperty('ccm.database.path')     
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   195
    waroot = project.getProperty('create.bom.workarea.root')
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   196
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   197
    session = ccmutil.get_session(database, username, password, engine, dbpath)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   198
    cmproject = ccm.extra.get_toplevel_project(session, waroot)
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   199
    
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   200
    if cmproject == None:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   201
        print 'Error: ' + waroot + ' must be a synergy project and still be in database'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   202
    else:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   203
        project.setProperty("ccm.toplevel.project", str(cmproject))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   204
    session.close()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   205
except Exception, ex:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   206
    print 'Caught exception: ' + str(ex)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   207
    traceback.print_exc()
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   208
    if session:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   209
        session.close()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   210
                </script>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   211
                <hlm:python outputproperty="ccm.toplevel.baseline">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   212
import traceback
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   213
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   214
import logging
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   215
import ccmutil
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   216
logging.disable(logging.INFO)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   217
session = None
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   218
try:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   219
    database = ant.get_property(r'${ccm.database}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   220
    username = ant.get_property(r'${ccm.user.login}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   221
    password = ant.get_property(r'${ccm.user.password}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   222
    engine = ant.get_property(r'${ccm.engine.host}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   223
    dbpath = ant.get_property(r'${ccm.database.path}')
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   224
    session = ccmutil.get_session(database, username, password, engine, dbpath)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   225
    cmproject = session.create(ant.get_property(r'${ccm.toplevel.project}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   226
    print cmproject.baseline
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   227
    session.close()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   228
except Exception, ex:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   229
    print 'Caught exception: ' + str(ex)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   230
    traceback.print_exc()
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   231
    if session:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   232
        session.close()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   233
                </hlm:python>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   234
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   235
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   236
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   237
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   238
    <!--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   239
    Look 'startsWith' and find complete CM name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   240
    Output property: '{startsWith}.project'.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   241
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   242
    @scope private
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   243
    -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   244
    <macrodef name="releaseNotesGetProjectName" uri="http://www.nokia.com/helium">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   245
        <attribute name="startsWith" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   246
        <sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   247
            <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   248
                <available file="${build.log.dir}/${build.id}_bom.xml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   249
                <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   250
                    <hlm:python outputproperty="@{startsWith}.project">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   251
import amara
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   252
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   253
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   254
bomfile = open(r"${build.log.dir}/${build.id}_bom.xml")
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   255
bom = amara.parse(bomfile)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   256
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   257
for p in bom.bom.content.project:
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   258
    if (str(p.name).startswith(ant.get_property(r'@{startsWith}'))):
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   259
        print str(p.name)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   260
bomfile.close()
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   261
                    </hlm:python>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   262
                </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   263
            </if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   264
        </sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   265
    </macrodef>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   266
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   267
    <!-- Write projects, baselines and task list for MC and IBUSAL
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   268
    @scope private    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   269
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
    <target name="release-notes-ccm" depends="get-ccm-password,release-notes-getcmprojectname,create-bom">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   271
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   272
            <and>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   273
                <istrue value="${ccm.enabled}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   274
                <available file="${build.log.dir}/${build.id}_bom.xml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   275
            </and>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   276
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   277
                <hlm:python>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   278
import amara
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   279
import ant
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   280
import bomtofile
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   281
import ccmutil
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   282
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   283
bomfile = open(r"${build.log.dir}/${build.id}_bom.xml")
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   284
bom = amara.parse(bomfile)
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   285
password = ant.get_property(r'${ccm.user.password}')
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   286
session = ccmutil.get_session(ant.get_property(r'${ccm.database}'), ant.get_property(r'${ccm.user.login}'), password, ant.get_property(r'${ccm.engine.host}'), ant.get_property(r'${ccm.database.path}'))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   287
for p in bom.bom.content.project:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   288
    if p.name == ant.get_property(r'${ccm.toplevel.project}'):
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   289
        bomwriter = bomtofile.BOMWriter(session, 'MC', p, ant.get_property(r'${releasenotes.output.dir}'))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   290
        bomwriter.writeprojects()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   291
        bomwriter.writebaselines()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   292
        bomwriter.writetasks()
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   293
            
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   294
    if (str(p.name).startswith('IBUSAL')):
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   295
        bomwriter = bomtofile.BOMWriter(session, 'IBUSAL', p, ant.get_property(r'${releasenotes.output.dir}'))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   296
        bomwriter.writeprojects()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   297
        bomwriter.writetasks()
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   298
session.close()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   299
bomfile.close()
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   300
                </hlm:python>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   301
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   302
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   303
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   304
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   305
    <!-- Read BOM and write ICF list
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   306
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   307
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   308
    <target name="release-notes-icfs" depends="create-bom">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   309
        <exec executable="python" failonerror="${failonerror}">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   310
            <arg line="-m icf2txt"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   311
            <arg value="${temp.build.dir}/${build.id}_BOM.xml"/>            
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   312
            <arg value="${releasenotes.output.dir}/icdicf.txt"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   313
        </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   314
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   315
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   316
    <!-- @scope private -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   317
    <target name="release-notes-test" if="hlm.enable.asserts">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   318
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   319
            <istrue value="${ccm.enabled}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   320
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   321
                <hlm:python>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   322
import ccm
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   323
#check for ccm session leaks
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   324
assert (len(ccm.running_sessions()) == 0)
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   325
                </hlm:python>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   326
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   327
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   328
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   329
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   330
    <!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   331
    Generates a product release note based on a template in config dir
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   332
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   333
    <target name="release-notes" description="Generates a product release note based off a template in config dir">        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   334
        <mkdir dir="${releasenotes.output.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   335
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   336
        <copy file="${releasenotes.props}" tofile="${releasenotes.temp.props}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   337
            <filterchain>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   338
                <expandproperties/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   339
            </filterchain>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   340
        </copy>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   341
          
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   342
        <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   343
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   344
import rtfutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   345
rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   346
rn.rtfconvert(ant.get_property(r'${releasenotes.temp.props}'), ant.get_property(r'${releasenotes.temp.props2}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   347
        </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   348
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   349
        <property file="${releasenotes.temp.props2}"/>                
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   350
        <copy file="${releasenotes.template}" tofile="${releasenotes.output}" overwrite="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   351
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   352
        <antcall target="release-notes-logo" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   353
        <antcall target="release-notes-error-summary" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   354
        <antcall target="release-notes-variant-configuration" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   355
            
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   356
        <delete file="${releasenotes.temp.errors}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   357
        <delete file="${releasenotes.temp.output}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   358
        <delete file="${releasenotes.temp.props}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   359
        <delete file="${releasenotes.temp.props2}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   360
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   361
        <antcall target="release-notes-ccm"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   362
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   363
        <antcall target="release-notes-icfs"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   364
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   365
        <antcall target="release-notes-replace"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   366
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   367
        <antcall target="release-notes-test"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   368
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   369
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   370
</project>