Created
June 17, 2010 09:50
-
-
Save robb1e/441917 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="staging.deploy"> | |
<echo message="Stopping the server"/> | |
<exec executable="${staging.directory}/etc/init.d/${staging.startstop}" dir="${staging.directory}"> | |
<arg line="stop"/> | |
</exec> | |
<echo message="Cleaning the environment"/> | |
<exec executable="grails"> | |
<env key="JAVA_HOME" value="/usr/lib/jvm/java-6-sun/"/> | |
<arg line="clean"/> | |
</exec> | |
<echo message="Starting the server"/> | |
<exec executable="${staging.directory}/etc/init.d/${staging.startstop}" dir="${staging.directory}" spawn="true"> | |
<env key="BUILD_ID" value="dontKillMe" /> | |
<env key="JAVA_HOME" value="/usr/lib/jvm/java-6-sun/"/> | |
<arg line="start"/> | |
</exec> | |
<echo message="Checking and waiting on port ${staging.port}"/> | |
<waitfor maxwait="120" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="deploy.failed"> | |
<socket server="localhost" port="${staging.port}"/> | |
</waitfor> | |
<fail if="deploy.failed" message="Timed out waiting for deploy"/> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment