buildframework/helium/tools/publish/synergy.ant.xml
author wbernard
Tue, 27 Apr 2010 08:33:08 +0300
changeset 587 85df38eb4012
parent 217 0f5e3a7fb6af
child 628 7c4a911dc066
permissions -rw-r--r--
helium_9.0-a7879c935424

<?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:

============================================================================
-->
<!--* @package publishing -->
<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="${build.log.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(${build.log.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>

    <!--* @property ccm.cache.xml
    Location of the cache.xml file which enables global synergy sessions.
    @type string
    @editable required
    @scope public
    -->

    <!-- 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>