buildframework/helium/tools/publish/synergy.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
child 593 4367a1b2db65
permissions -rw-r--r--
helium_7.0-r14027

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : synergy.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="publish.synergy" xmlns:hlm="http://www.nokia.com/helium">
    <description>
    Synergy publishing related targets
    </description>

    <!-- Validate all the inputs for the publish-tasks-to-folder target. -->
    <target name="publish-tasks-to-folder-check" if="publish.ccm.folder">
        <condition property="do.publish-tasks-to-folder" value="true">
            <available file="${temp.build.dir}/${build.id}_bom.xml" />
        </condition>
    </target>

    <!-- Copies all the task found in the BOM into defined folder. -->
    <target name="publish-tasks-to-folder" depends="publish-tasks-to-folder-check" if="do.publish-tasks-to-folder">
        <mkdir dir="${temp.build.dir}" />
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/task-publish.ant.xml.ftl" outputFile="${temp.build.dir}/task-publish.ant.xml">
            <freemarkerLinks expandProperties="yes">
                macro: ${helium.dir}/tools/common/templates/macro
            </freemarkerLinks>
            <data expandProperties="yes">
                bom: xml(${temp.build.dir}/${build.id}_bom.xml)
                ant: antProperties()
            </data>
        </fmpp>
        <hlm:assertFileExists file="${temp.build.dir}/task-publish.ant.xml" />
        <ant antfile="${temp.build.dir}/task-publish.ant.xml" dir="${build.drive}/" />
    </target>

    <!-- Change team level release tag to program level release tag -->
    <target name="change-release-tag" if="teamlevel.ci.system">
        <if>
            <isset property="ccm.cache.xml" />
            <then>
                <hlm:createSessionMacro database="${ccm.database}" reference="releasetag.session" cache="${ccm.cache.xml}"/>
            </then>
            <else>
                <hlm:createSessionMacro database="${ccm.database}" reference="releasetag.session" />
            </else>
        </if>
        <hlm:ccm verbose="false">
            <hlm:sessionset refid="releasetag.session" />
            <hlm:changereleasetag folder="${teamlevel.folder.number}" releasetag="${programlevel.release.tag}" />
        </hlm:ccm>
        <if>
            <not>
                <isset property="ccm.cache.xml" />
            </not>
            <then>
                <hlm:ccm verbose="false">
                    <hlm:sessionset refid="releasetag.session" />
                    <hlm:close />
                </hlm:ccm>
            </then>
        </if>
    </target>

</project>