Ant task - "setup-kotlin-home" checks availability of "bootstrap.compiler", set in TC environment

This commit is contained in:
Evgeny Goldin
2012-01-22 17:13:36 +02:00
parent 11dbb76363
commit 317ef287e5
+28 -15
View File
@@ -21,22 +21,35 @@
<available file="${kotlin-home}" type="dir"/>
</not>
<then>
<if>
<not>
<available file="${output}/${output.name}.zip"/>
</not>
<then>
<antcall target="dist"/>
</then>
</if>
<mkdir dir = "${kotlin-home}"/>
<unzip src = "${output}/${output.name}.zip"
dest = "${kotlin-home}"/>
<move todir = "${kotlin-home}">
<fileset dir = "${kotlin-home}/kotlinc"/>
</move>
<delete dir = "${kotlin-home}/kotlinc" failonerror = "true"/>
<if>
<available file="${basedir}/bootstrap.compiler/kotlinc" type="dir"/>
<then>
<!-- Running in TeamCity environment -->
<copy todir="${kotlin-home}">
<fileset dir = "${basedir}/bootstrap.compiler/kotlinc"/>
</copy>
</then>
<else>
<!-- Running in dev environment -->
<if>
<not>
<available file="${output}/${output.name}.zip"/>
</not>
<then>
<antcall target="dist"/>
</then>
</if>
<unzip src = "${output}/${output.name}.zip"
dest = "${kotlin-home}"/>
<move todir = "${kotlin-home}">
<fileset dir = "${kotlin-home}/kotlinc"/>
</move>
<delete dir = "${kotlin-home}/kotlinc" failonerror = "true"/>
</else>
</if>
</then>
</if>