view build/ @ 686:1efd1846f00a

Add an option for using tar archive for building a full patch This is a workaround for the case when java cannot read some file from the repository due to encoding used in a file name.
author Dmitry Neverov <>
date Tue, 17 Dec 2013 13:38:24 +0100
parents 7a4ecffe34a9
children 31a1aca3305c
line wrap: on
line source
<project name="build hooks" default="replace-tokens-in-teamcity-plugin-xml" basedir=".">

  <target name="replace-tokens-in-teamcity-plugin-xml">
    <property name="home" value="${artifact.output.path}"/>

      <format property="timestamp" pattern="yyyyMMddhhmmss"/>

    <property name="" value="SNAPSHOT-${timestamp}"/>

    <condition property="plugin.version" value="${}" else="${build.number}">
          <isset property="build.number"/>
        <matches pattern="snapshot-.*" string="${build.number}" casesensitive="false"/>

    <echo message="replacing tokens in teamcity-plugin.xml file under ${home}"/>
    <echo message="Setting version to: ${plugin.version}"/>

    <!-- update all references in teamcity-plugin.xml files -->
    <replace dir="${home}" summary="true">
      <include name="**/teamcity-plugin.xml"/>
      <replacefilter token="@version@" value="${plugin.version}"/>