1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 01:06:01 +02:00

Updated the build scripts to use scp. This required a little expect magic to get working since the jsch ant plugin had issues hooking up to the new server cluster.

This commit is contained in:
Doug Schaefer 2005-02-24 20:10:52 +00:00
parent f2e223947e
commit db27590854
4 changed files with 20 additions and 25 deletions

View file

@ -7,11 +7,8 @@ die() {
exit 1
}
[ -n "$JAVA_HOME" ] || die JAVA_HOME not set
[ -n "$ECLIPSE_HOME" ] || die ECLIPSE_HOME not set
export PATH="$JAVA_HOME/bin:$PATH"
cd `dirname $0`
java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner $* 2>&1 | tee build.log

View file

@ -23,13 +23,14 @@
<property name="mailto" value="cdt-test-dev@eclipse.org"/>
<property name="cdtuser" value="nobody"/>
<property name="cdtpasswd" value="home"/>
<property name="remotedir" value="ftp://download1.eclipse.org/cdt/builds/${branchVersion}"/>
<property name="remotedir" value="${cdtuser}@download1.eclipse.org:cdt/builds/${branchVersion}"/>
<property name="baseos" value="${osgi.os}"/>
<property name="basews" value="${osgi.ws}"/>
<property name="basearch" value="${osgi.arch}"/>
<condition property="onWindows">
<os family="windows"/>
</condition>
<mkdir dir="${buildDirectory}"/>
</target>
<target name="fetch" depends="init">
@ -48,7 +49,7 @@
</target>
<target name="unzip" depends="init" unless="dontUnzip">
<unzip src="${eclipseZip}" dest="${buildDirectory}"/>
<untar src="${eclipseZip}" dest="${buildDirectory}" compression="gzip"/>
</target>
<target name="zips" depends="init,unzip">
@ -107,23 +108,23 @@
</target>
<target name="upload" depends="init" unless="hasErrors">
<exec dir="${buildDirectory}" executable="curl">
<arg line="-s -u${cdtuser}:${cdtpasswd} ${remotedir}/index.html -o index.html"/>
<exec dir="${buildDirectory}" executable="expect">
<arg line="${basedir}/myscp ${cdtpasswd} ${remotedir}/index.html index.html"/>
</exec>
<replace file="${buildDirectory}/index.html">
<replacetoken><![CDATA[ <!-- add here -->]]></replacetoken>
<replacevalue><![CDATA[ <li><a href="@buildId@/index.html">@buildId@</a></li>
<replacevalue><![CDATA[ <li><a href="@buildType@.@buildId@/index.html">@buildId@</a></li>
<!-- add here -->]]></replacevalue>
</replace>
<replace file="${buildDirectory}/index.html">
<replacefilter token="@buildType@" value="${buildType}"/>
<replacefilter token="@buildId@" value="${buildId}"/>
</replace>
<exec dir="${buildDirectory}" executable="curl">
<arg line="-s -u${cdtuser}:${cdtpasswd} -T index.html ${remotedir}/index.html"/>
<exec dir="${buildDirectory}" executable="expect">
<arg line="${basedir}/myscp ${cdtpasswd} index.html ${remotedir}/index.html"/>
</exec>
<exec dir="${zipsdir}" executable="sh">
<arg line="${basedir}/upload.sh ${cdtuser} ${cdtpasswd} ${remotedir}/${buildId}/"/>
<exec dir="${buildDirectory}" executable="expect">
<arg line="${basedir}/myscp ${cdtpasswd} -r ${buildType}.${buildId} ${remotedir}"/>
</exec>
</target>
@ -139,7 +140,7 @@
<replacefilter token="@buildId@" value="${buildId}"/>
</replace>
<mail subject="CDT ${branchVersion} Build ${buildId} completed"
tolist="${mailto}" from="dschaefe@ca.ibm.com">
tolist="${mailto}" from="dschaefe@ca.ibm.com">
<message src="message.txt"/>
</mail>
</target>
@ -275,7 +276,7 @@
<!--antcall target="${target}">
<param name="type" value="fragment"/>
<param name="dir" value="plugins"/>
<param name="id" value="org.eclipse.cdt.source.hpux.motif.PA_RISC"/>
<param name="id" value="org.eclipse.cdt.source.dschaefer2hpux.motif.PA_RISC"/>
</antcall-->
<antcall target="${target}">
<param name="type" value="fragment"/>

View file

@ -0,0 +1,8 @@
#!/usr/bin/expect -f
set passwd [lindex $argv 0]
set timeout 6000
set id [eval spawn scp -q [lrange $argv 1 end]]
expect "Password:" { send "$passwd\r" }
expect

View file

@ -1,11 +0,0 @@
# This script must be run from the directory you want to upload
# Arguments
# $1 - username
# $2 - password
# $3 - target URL
for i in *
do
curl -s --ftp-create-dirs -u$1:$2 -T $i $3
done