common/templates/tag-hg-code.ant.xml.ftl
author DarioS@UK-DarioS.symbian.int
Wed, 08 Apr 2009 15:35:55 +0100
changeset 54 24d7d3a8a2f2
parent 42 b6e2360f1ab4
child 55 4b303c38b677
permissions -rw-r--r--
Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     1
<?xml version="1.0"?>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     2
<project name="SF-TAG-HG-CODE" default="all" xmlns:hlm="http://www.nokia.com/helium">
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     3
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     4
<#assign target_depends = "" />
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     5
<#assign count = 0 />
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     6
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     7
<#list data as pkg_detail>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     8
    <target name="sf-tag-hg-code-${count}">
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
     9
        <sequential>
54
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    10
        
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    11
          <trycatch> <!-- build must not fail if this command gives an error -->
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    12
            <try>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    13
              <hlm:scm verbose="true" scmUrl="scm:hg:${pkg_detail.source}">
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    14
                <hlm:tag basedir="${ant['sf.spec.job.drive']}${pkg_detail.dst}" name="${ant['sf.tagafterbuild.tag']}" level="normal"/>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    15
              </hlm:scm>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    16
            </try>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    17
            <catch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    18
              <echo message="WARNING: failed to tag code with label '${ant['sf.tagafterbuild.tag']}' (does the tag already exist?)"/>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    19
            </catch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    20
          </trycatch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    21
          
41
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    22
        </sequential>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    23
    </target>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    24
    
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    25
    <#if (count == 0) >
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    26
    				<#assign target_depends = "${target_depends}" + "sf-tag-hg-code-${count}" />
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    27
    </#if>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    28
    <#if (count > 0) >
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    29
            <#assign target_depends ="${target_depends}" + ","+"sf-tag-hg-code-${count}"/>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    30
    </#if>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    31
    
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    32
    <#assign count = count + 1 />
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    33
</#list>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    34
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    35
<target name="all" depends="${target_depends}"/>
f137ddbb714d Added tagging of source code used in the build
dariosestito@L063522.prod.ad.symbian.intra
parents:
diff changeset
    36
54
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    37
</project>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    38
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    39
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    40
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    41
<trycatch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    42
    <try>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    43
 
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    44
        <scm ....>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    45
            <tag ....>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    46
        </scm>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    47
    </try>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    48
    <catch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    49
        <echo>Fail to tag: &lt;catch&gt;.</echo>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    50
    </catch>
24d7d3a8a2f2 Added try/catch around the tagging, so that the build doesn't fail if tag gives an error
DarioS@UK-DarioS.symbian.int
parents: 42
diff changeset
    51
</trycatch>