Permalink
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (68 sloc) 4.04 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="intellij_elixir">
<dirname file="${ant.file.intellij_elixir}" property="intellij_elixir.basedir"/>
<property name="intellij_elixir.sha1" value="v0.1.1"/>
<property name="intellij_elixir.output.dir" value="${intellij_elixir.basedir}/dependencies/intellij_elixir"/>
<property name="intellij_elixir.output.repo.dir" value="${intellij_elixir.output.dir}/git/KronicDeth/intellij_elixir"/>
<available file="${intellij_elixir.output.repo.dir}" property="intellij_elixir.output.repo.available"/>
<property name="intellij_elixir.executable" value="${intellij_elixir.output.repo.dir}/rel/intellij_elixir/bin/intellij_elixir"/>
<target name="checkout.intellij_elixir" depends="fetch.intellij_elixir">
<exec dir="${intellij_elixir.output.repo.dir}" executable="git">
<arg value="checkout"/>
<arg value="${intellij_elixir.sha1}"/>
</exec>
</target>
<target name="clone.intellij_elixir" unless="intellij_elixir.output.repo.available">
<mkdir dir="${intellij_elixir.output.dir}"/>
<exec dir="${intellij_elixir.output.dir}" executable="git">
<arg value="clone"/>
<arg value="https://github.com/KronicDeth/intellij_elixir.git"/>
<arg value="${intellij_elixir.output.repo.dir}"/>
</exec>
</target>
<import file="${intellij_elixir.basedir}/elixir.xml"/>
<target name="deps.get.intellij_elixir" depends="local.hex.intellij_elixir,make.elixir">
<exec dir="${intellij_elixir.output.repo.dir}" executable="${elixir.output.zip.root.dir}/bin/mix">
<arg value="deps.get"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
</target>
<target name="fetch.intellij_elixir" depends="clone.intellij_elixir">
<exec dir="${intellij_elixir.output.repo.dir}" executable="git">
<arg value="fetch"/>
</exec>
</target>
<target name="local.hex.intellij_elixir" depends="checkout.intellij_elixir,make.elixir">
<property environment="env"/>
<exec dir="${intellij_elixir.output.repo.dir}" executable="${elixir.output.zip.root.dir}/bin/mix">
<arg value="local.hex"/>
<arg value="--force"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
</target>
<target name="release.intellij_elixir" depends="deps.get.intellij_elixir,make.elixir">
<!-- Removing these files prevents `Application metadata file exists but is malformed` when doing `mix release`
for intellij_elixir -->
<delete file="${elixir.output.zip.root.dir}/lib/mix/test/fixtures/deps_status/_build/dev/lib/invalidapp/ebin/invalidapp.app"/>
<delete file="${elixir.output.zip.root.dir}/lib/mix/test/fixtures/deps_status/_build/dev/lib/invalidvsn/ebin/invalidvsn.app"/>
<delete file="${elixir.output.zip.root.dir}/lib/mix/test/fixtures/deps_status/_build/dev/lib/nosemver/ebin/nosemver.app"/>
<delete file="${elixir.output.zip.root.dir}/lib/mix/test/fixtures/deps_status/_build/dev/lib/ok/ebin/ok.app"/>
<delete dir="${elixir.output.zip.root.dir}/lib/mix/test/fixtures/archive"/>
<exec dir="${intellij_elixir.output.repo.dir}" executable="${elixir.output.zip.root.dir}/bin/mix">
<arg value="release"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
</target>
<target name="start.intellij_elixir" depends="release.intellij_elixir,make.elixir">
<exec executable="${intellij_elixir.executable}">
<arg value="start"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
</target>
<target name="stop.intellij_elixir" depends="release.intellij_elixir,make.elixir">
<exec executable="${intellij_elixir.executable}">
<arg value="stop"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
</target>
</project>