blob: 43254b1f0f6399aa2d93f1b815f50094093f9f1d [file]
<project default="default" basedir=".">
<property file="../../releng-doc/maps/build.cfg"/>
<target name="default">
<echo message="This build script is designed to be called from buildAll.xml."/>
</target>
<!-- Unzip the WTP SDK driver from the download directory. Used if this
is specifically a doc build. -->
<target name="unzipWTPSDK">
<!-- Unzip the source plugins from the WTP SDK build. -->
<unzip dest="${buildDirectory}/WSTSourcePlugins" src="${build.home}/${build.drivers}/${wtpFile}" overwrite="true">
<patternset>
<include name="**/*org.eclipse.wst.source*/**/*"/>
</patternset>
</unzip>
<unzip dest="${buildDirectory}/JSTSourcePlugins" src="${build.home}/${build.drivers}/${wtpFile}" overwrite="true">
<patternset>
<include name="**/*org.eclipse.jst.source*/**/*"/>
</patternset>
</unzip>
</target>
<!-- Unzip the current WTP SDK driver (ie. the one that was built as part
of this build). Used for regular builds.-->
<target name="unzipCurrentWTPSDK">
<!-- Unzip the source plugins from the WTP SDK build. -->
<unzip dest="${buildDirectory}/WSTSourcePlugins" src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildId}.zip" overwrite="true">
<patternset>
<include name="**/*org.eclipse.wst.source*/**/*"/>
</patternset>
</unzip>
<unzip dest="${buildDirectory}/JSTSourcePlugins" src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildId}.zip" overwrite="true">
<patternset>
<include name="**/*org.eclipse.jst.source*/**/*"/>
</patternset>
</unzip>
</target>
<!-- Run the doc build. -->
<target name="buildDoc">
<echo message="Building Docs"/>
<antcall target="unzipCurrentWTPSDK"/>
<antcall target="docBuild"/>
</target>
<!-- Run a standalone doc build. -->
<target name="buildDocStandalone">
<echo message="Building Docs"/>
<antcall target="getDocPreReq"/>
<antcall target="unzipWTPSDK"/>
<antcall target="docBuild"/>
<antcall target="publishDoc"/>
</target>
<!-- Build the doc zips. -->
<target name="docBuild">
<antcall target="tagRelengDoc" />
<!-- WST TARGETS -->
<ant antfile="build.xml" target="main">
<property name="component" value="wst.doc"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="wst.doc-sdk"/>
</ant>
<!-- JST TARGETS -->
<ant antfile="build.xml" target="main">
<property name="component" value="jst.doc"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="jst.doc-sdk"/>
</ant>
</target>
<!-- Check if the WTP SDK driver has already been downloaded and get the driver. -->
<target name="getDocPreReq">
<available file="${build.home}/${build.drivers}/${wtpFile}" property="wtpfile.exists"/>
<antcall target="getWTP" />
</target>
<!-- Get the WTP SDK driver if it hasn't already been retrieved. -->
<target name="getWTP" unless="wtpfile.exists" >
<get src="${wtpURL}" dest="${build.home}/${build.drivers}/${wtpFile}" />
</target>
<target name="tagRelengDoc" unless="doTrial">
<ant antfile="build.xml" target="main">
<property name="component" value="releng-doc"/>
</ant>
</target>
<!-- Create the Web pages needed to distribute the doc build. -->
<target name="publishDoc">
<property name="result" value="${buildDirectory}/${buildLabel}"/>
<tstamp>
<format property="TODAY" pattern="MMMM d, yyyy"/>
</tstamp>
<property name="indexFileName" value="index.php" />
<copy todir="${result}">
<fileset dir="../webpages/staticDocDropFiles" />
</copy>
<!-- Insert Build Date -->
<replace file="${result}/${indexFileName}" token="%date%" value="${TODAY}"/>
<!-- Insert Build Name -->
<replace file="${result}/${indexFileName}" token="%wtpBuildName%" value="${wtpBuildName}"/>
<replace file="${result}/${indexFileName}" token="%build%" value="${buildId}"/>
<replace file="${result}/${indexFileName}" token="%buildLabel%" value="${buildLabel}"/>
<!-- Insert WTP version -->
<replace file="${result}/${indexFileName}" token="%wtpbuildname%" value="${wtpBuildName}"/>
<replace file="${result}/${indexFileName}" token="%wtpurl%" value="${wtpBuildLocation}"/>
<!-- Insert WTP version drivers -->
<replace file="${result}/${indexFileName}" token="%wtpruntime%" value="wtp-${buildId}.zip"/>
<replace file="${result}/${indexFileName}" token="%wtpsdk%" value="wtp-sdk-${buildId}.zip"/>
<replace file="${result}/${indexFileName}" token="%wst%" value="wtp-wst-${buildId}.zip"/>
<replace file="${result}/${indexFileName}" token="%wst-sdk%" value="wtp-wst-sdk-${buildId}.zip"/>
<!-- Get the build map over for the results to point to. -->
<copy file="${buildDirectory}/directory.txt" tofile="${result}/directory.txt"/>
<checksum >
<fileset dir="${result}">
<include name="*.zip"/>
</fileset>
</checksum>
</target>
</project>