bootstrap.xml
author Dario Sestito <darios@symbian.org>
Fri, 26 Jun 2009 17:08:28 +0100
changeset 21 4b02facbff8f
parent 20 78c3f68f39f1
child 24 ed4e68942437
permissions -rw-r--r--
Changed path to take account of new bishare alias

<?xml version="1.0" encoding="UTF-8"?>
<project name="SF-BOOTSTRAP" default="bootstrap" xmlns:hlm="http://www.nokia.com/helium">
    
  <property environment="env"/>
    
  <dirname property="sf.bootstrap.dir" file="${ant.file.SF-CONFIG}"/>
  
  <import file="${helium.dir}/helium.ant.xml" /> 
  
  <!-- target dir -->
  <property name="bootstrap.base.dir" value="D:\fbf_project"/> <!-- old name -->
  <property name="sf.target.dir" value="${bootstrap.base.dir}"/>
  
  <!-- config -->
  <property name="sf.config.repo" value="${sf.config.repository}"/> <!-- old name -->
  <property name="sf.config.rev" value="tip"/>
  <echo message="config: repo=${sf.config.repo} rev=${sf.config.rev}"/>
  
  <!-- project -->
  <property name="sf.project.repo" value="${platform.config.repository}"/> <!-- old name -->
  <property name="sf.project.rev" value="tip"/>
  <echo message="project: repo=${sf.project.repo} rev=${sf.project.rev}"/>

  <target name="bootstrap" depends="init,get-sf-config,get-sf-project" />

  <target name="init">
    <mkdir dir="${sf.target.dir}" />
    <mkdir dir="${sf.target.dir}/build" />
    <mkdir dir="${sf.target.dir}/build/config" />
  </target>
    
  <target name="clean-env">
    <echo message="cleaning up the environment" />
    <delete dir="${sf.target.dir}/" />
  </target>

  <target name="get-sf-config">
    <if>
      <isset property="sf.config.dir"/>
      <then>
        <echo message="Getting FBF configuration from dir ${sf.config.dir}"/>
        <copy todir="${sf.target.dir}/sf-config">
          <fileset dir="${sf.config.dir}"/>
        </copy>
      </then>
      <else>
        <echo message="Getting FBF configuration from repository ${sf.config.repo}"/>
        <hlm:scm verbose="true" scmUrl="scm:hg:${sf.config.repo}">
          <hlm:checkout basedir="${sf.target.dir}/sf-config"/>
          <hlm:tags basedir="${sf.target.dir}/sf-config" reference="hg.tags.id1"/>
          <hlm:update basedir="${sf.target.dir}/sf-config">
            <hlm:latestTag pattern="${sf.config.rev}">
              <hlm:tagSet refid="hg.tags.id1"/> 
            </hlm:latestTag>
          </hlm:update>
        </hlm:scm>
      </else>
    </if>
  </target>

  <target name="get-sf-project">
    <if>
      <isset property="sf.project.dir"/>
      <then>
        <echo message="Getting FBF project from dir ${sf.project.dir}"/>
        <copy todir="${sf.target.dir}/build/config">
          <fileset dir="${sf.project.dir}"/>
        </copy>
      </then>
      <else>
        <echo message="Getting FBF project from repository ${sf.project.repo}"/>
        <hlm:scm verbose="true" scmUrl="scm:hg:${sf.project.repo}">
          <hlm:checkout basedir="${sf.target.dir}/build/config"/>
          <hlm:tags basedir="${sf.target.dir}/build/config" reference="hg.tags.id2"/>
          <hlm:update basedir="${sf.target.dir}/build/config">
            <hlm:latestTag pattern="${sf.project.rev}">
              <hlm:tagSet refid="hg.tags.id2"/>
            </hlm:latestTag>
          </hlm:update>
        </hlm:scm>
      </else>
    </if>
  </target>


</project>