Ant task - "setup-kotlin-home" checks availability of "bootstrap.compiler", set in TC environment
This commit is contained in:
+28
-15
@@ -21,22 +21,35 @@
|
|||||||
<available file="${kotlin-home}" type="dir"/>
|
<available file="${kotlin-home}" type="dir"/>
|
||||||
</not>
|
</not>
|
||||||
<then>
|
<then>
|
||||||
<if>
|
|
||||||
<not>
|
|
||||||
<available file="${output}/${output.name}.zip"/>
|
|
||||||
</not>
|
|
||||||
<then>
|
|
||||||
<antcall target="dist"/>
|
|
||||||
</then>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<mkdir dir = "${kotlin-home}"/>
|
<mkdir dir = "${kotlin-home}"/>
|
||||||
<unzip src = "${output}/${output.name}.zip"
|
|
||||||
dest = "${kotlin-home}"/>
|
<if>
|
||||||
<move todir = "${kotlin-home}">
|
<available file="${basedir}/bootstrap.compiler/kotlinc" type="dir"/>
|
||||||
<fileset dir = "${kotlin-home}/kotlinc"/>
|
<then>
|
||||||
</move>
|
<!-- Running in TeamCity environment -->
|
||||||
<delete dir = "${kotlin-home}/kotlinc" failonerror = "true"/>
|
<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>
|
</then>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user