File:  [mozdev] / linkvisitor / build.xml
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Mon Mar 14 19:13:56 2005 UTC (14 years ago) by bllaw
Branches: MAIN
CVS tags: HEAD
1.1

<project name="LinkVisitor" default="dist" basedir=".">
  <description>
    Create the xpi file for deployment
  </description>
  <property name="SOURCE" location="source"/>
  <property name="DOWNLOADS" location="downloads"/>

  <target name="init">
    <tstamp/>
    <input
      message="Please enter the version (010, 011, ...):"
      addproperty="VERSION"
    />  
  </target>

  <target name="updateversion" depends="init" description="Update version in files">
    <copy file="${SOURCE}/install.js.temp" 
      tofile="${SOURCE}/install.js" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
    <copy file="${SOURCE}/install.rdf.temp" 
      tofile="${SOURCE}/install.rdf" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
    <copy file="${SOURCE}/linkvisitor/content/linkvisitor/contents.rdf.temp" 
      tofile="${SOURCE}/linkvisitor/content/linkvisitor/contents.rdf" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
    <copy file="${SOURCE}/linkvisitor/locale/en-US/linkvisitor/contents.rdf.temp" 
      tofile="${SOURCE}/linkvisitor/locale/en-US/linkvisitor/contents.rdf" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
    <copy file="${SOURCE}/linkvisitor/locale/it-IT/linkvisitor/contents.rdf.temp" 
      tofile="${SOURCE}/linkvisitor/locale/it-IT/linkvisitor/contents.rdf" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
    <copy file="${SOURCE}/linkvisitor/locale/fr-FR/linkvisitor/contents.rdf.temp" 
      tofile="${SOURCE}/linkvisitor/locale/fr-FR/linkvisitor/contents.rdf" 
      overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="DSTAMP" value="${DSTAMP}"/>
          <token key="VERSION" value="${VERSION}"/>
        </replacetokens>
      </filterchain>  
    </copy>
  </target>

  <target name="jar" depends="updateversion" description="Jar the Source">
    <zip 
      destfile="${SOURCE}\chrome\linkvisitor.jar" 
      basedir="${SOURCE}\linkvisitor"> 
      <exclude name="**\*.temp"/>
      <exclude name="**\*.~*"/>
    </zip>
  </target>

  <target name="zip" depends="jar" description="Zip the files">
    <zip 
      destfile="${DOWNLOADS}\linkvisitor-${VERSION}.xpi" 
      basedir="${SOURCE}"> 
      <exclude name="**\*.temp"/>
      <exclude name="**\*.~*"/>
      <exclude name="linkvisitor\"/>
    </zip>
  </target>

  <target name="dist" 
    depends="init, zip" 
    description="Ready for distribution">
  </target>
</project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>