<?xml version="1.0" encoding="UTF-8"?>
<project name="XEMELIOS" basedir=".">
    <description>S'occupe de tagger les composants</description>
    
    <target name="tag" depends="read-properties" description="Tag le composant désigné par la propriété target.component">
        <!--cvs command="tag -f ${component.name}_${component.release} src/${target.component}"/-->
        <antcall target="doTag"/>
    </target>
    
    <target name="doTag" if="release.string"> <!-- component.release -->
        <!-- echo>cvs tag -f ${component.name}_${release.string} src/${target.component}</echo -->
        <exec executable="cvs" taskname="cvs">
            <!--arg value="-Q"/-->
            <arg value="tag"/>
            <arg value="-f"/>
            <arg value="${component.name}_${release.string}"/>
            <arg value="src/${target.component}"/>
        </exec>
        <!--echo>doTag called</echo-->
    </target>
    
    <target name="read-properties">
        <property file="src/${target.component}/component.properties"/>
        <java
            classpath="src/build-tools/build/jars/build-tools.jar"
            classname="fr.gouv.finances.cp.buildtools.FormatReleaseNumber"
            outputproperty="release.string">
            <arg value="${component.release}"/>
        </java>
        <echo>Preparing to tag ${target.component} -&gt; ${release.string}</echo>
    </target>
    
    <target name="is.module.modified">
        <property file="src/${target.component}/component.properties"/>
        <condition property="modified" value="true">
            <matches pattern=".*\+$" string="${component.release}"/>
        </condition>
        <antcall target="displayResult"/>
    </target>
    <target name="displayResult" if="modified">
        <echo>${target.component} modified</echo>
    </target>
</project>