Permalink
Browse files

fixes a bug with bat files invocation from ant

http://ant.apache.org/manual/Tasks/exec.html
Note that .bat files cannot in general by executed directly.
One needs to execute the command shell executable cmd using the /c switch.
  • Loading branch information...
xeno-by committed Jun 8, 2012
1 parent 59f0214 commit aa11b656e1f398cb3e66cb0d386f3723d0aa46f9
Showing with 10 additions and 2 deletions.
  1. +10 −2 build.xml
View
@@ -304,9 +304,17 @@ INITIALISATION
</condition>
<exec osfamily="unix" executable="tools/get-scala-commit-sha" outputproperty="git.commit.sha" failifexecutionfails="false" />
<exec osfamily="windows" executable="tools/get-scala-commit-sha.bat" outputproperty="git.commit.sha" failifexecutionfails="false" />
<exec osfamily="windows" executable="cmd.exe" outputproperty="git.commit.sha" failifexecutionfails="false">
<arg value="/c"/>
<arg value="tools\get-scala-commit-sha.bat"/>
<arg value="-p"/>
</exec>
<exec osfamily="unix" executable="tools/get-scala-commit-date" outputproperty="git.commit.date" failifexecutionfails="false" />
<exec osfamily="windows" executable="tools/get-scala-commit-date.bat" outputproperty="git.commit.date" failifexecutionfails="false" />
<exec osfamily="windows" executable="cmd.exe" outputproperty="git.commit.date" failifexecutionfails="false">
<arg value="/c"/>
<arg value="tools\get-scala-commit-date.bat"/>
<arg value="-p"/>
</exec>
<!-- some default in case something went wrong getting the revision -->
<property name="git.commit.sha" value="unknown"/>
<property name="git.commit.date" value="unknown"/>

0 comments on commit aa11b65

Please sign in to comment.