blob: 5918ab277b8855b7a5e983c86b5f6ce2cf86c64a [file] [log] [blame]
<project name="upload" default="upload" basedir=".">
<!-- if site-sub-dir not set by caller, assume its committers -->
<property name="site-sub-dir" value="committers" />
<!-- = = = standard properties pattern = = = -->
Note to be cross-platform, "environment variables" are only appropriate for
some variables, e.g. ones we set, since properties are case sensitive, even if
the environment variables on your operating system are not, e.g. it will
be ${env.Path} not ${env.PATH} on Windows -->
<property environment="env" />
Let users override standard properties, if desired.
If directory, file, or some properties do not exist,
then standard properties will be used.
<property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${}.properties" />
<!-- load standard properties for production environment -->
<property file="${env.STANDARD_PROPERTIES_DIR}/${}.properties" />
<!-- = = = end standard properties pattern = = = -->
<!-- if not otherwise set, these are standard properties -->
<property name="build.upload" value="true" />
<property name="uploadUser" value="david_williams" />
<property name="uploadPassword" value="This is not really used since ssh login is assumed (required)" />
<property name="uploadServer" value="" />
<property name="uploadRemoteDirectory" value="/home/data/users/${uploadUser}/downloads/webtools/${site-sub-dir}/drops/${buildBranch}" />
<!-- rsyncRootPrefix should be empty for Linux machines. -->
<!-- But, Windows using cygwin will need something like /cygdrive/G/ -->
<!-- for what ever drive or directory is parent of build home -->
<property name="rsyncRootPrefix" value="" />
<!-- end standard properties -->
<target name="upload"
<ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
<property file="${buildDirectory}/" />
<echo message="chmod for ${buildDirectory}/${buildLabel}" />
<!-- synch on host is a tiny bit faster if permisions already set -->
<!-- and, remember, chmod ant task is implemented only for unix -->
<!-- TODO: put in windows logic here? -->
<exec executable="chmod">
<arg line="-Rc o+rx ${buildDirectory}/${buildLabel}" />
<echo message="RSYNC to: ${uploadRemoteDirectory}/${buildLabel}" />
<exec executable="rsync">
<arg line="-e ssh -Cavz ${rsyncRootPrefix}/${buildDirectory}/${buildLabel} ${uploadUser}@${uploadServer}:${uploadRemoteDirectory}" />
<target name="check.upload">
<condition property="doUpload">
<equals arg1="${build.upload}" arg2="true" />