Skip to content

Instantly share code, notes, and snippets.

@gregjan
Created October 7, 2011 17:20
Show Gist options
  • Save gregjan/1270834 to your computer and use it in GitHub Desktop.
Save gregjan/1270834 to your computer and use it in GitHub Desktop.
ant tasks for posting Cw downloads/repo
<tasks>
<if>
<contains
string="${project.version}"
substring="-SNAPSHOT" />
<then>
<sshexec
host="${cw.deploy.host}"
username="${cw.deploy.username}"
passphrase="${cw.deploy.passphrase}"
keyfile="${cw.deploy.keyfile}"
trust="true"
command="rm -rf --preserve-root ${cw.deploy.base}/${project.version}"
failonerror="false" />
</then>
</if>
<sshexec
host="${cw.deploy.host}"
username="${cw.deploy.username}"
passphrase="${cw.deploy.passphrase}"
keyfile="${cw.deploy.keyfile}"
trust="true"
command="mkdir ${cw.deploy.base}/${project.version}" />
<scp
todir="${cw.deploy.username}@${cw.deploy.host}:${cw.deploy.base}/${project.version}"
passphrase="${cw.deploy.passphrase}"
keyfile="${cw.deploy.keyfile}"
verbose="true"
trust="true"
>
<fileset
dir="target/repository"
>
<include
name="**" />
</fileset>
<fileset
dir="target/products"
>
<include
name="*.zip" />
</fileset>
</scp>
</tasks>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment