| <project name="Publish Build" default="default" basedir="."> |
| |
| <!-- Properties that must be passed to this script: |
| buildDirectory: Path to perform the build in. (A working directory) |
| buildType: Type of build (nightly, integration etc.) |
| buildId: Build name |
| buildLabel: <buildType>-<buildName>-<timestamp> |
| --> |
| |
| <property environment="env" /> |
| |
| <property name="resultDir" |
| value="${buildDirectory}/${buildLabel}" /> |
| <!--name of generated index page--> |
| <property name="indexFileName" value="index.php" /> |
| |
| <property name="templateDir" value="${dltk.builder.home}/distribution/dltk.site" /> |
| <property name="resultingIndex" value="${resultDir}/${indexFileName}" /> |
| |
| <echo message="resultDir: ${resultDir}" /> |
| <echo message="templateDir: ${templateDir}" /> |
| <echo message="resultingIndex: ${resultingIndex}" /> |
| |
| |
| |
| <target name="default"> |
| <copy overwrite="true" file="${dltk.builder.home}/distribution/dltk.site/templateFiles/${indexTemplateFilename}" tofile="${resultingIndex}" /> |
| <antcall target="countFiles" /> |
| <antcall target="generateCompileIndex" /> |
| <antcall target="generateJUnitTestsIndex" /> |
| <antcall target="getStaticFiles" /> |
| <antcall target="updateSite" /> |
| <antcall target="digest" /> |
| </target> |
| |
| <target name="generateCompileIndex" > |
| |
| |
| <!-- |
| <taskdef name="indexResults" classname="org.eclipse.dltk.releng.tools.ResultsSummaryGenerator" /> |
| --> |
| |
| <!-- |
| isBuildTested: true|false should JUnit plugin test results be used to generate index page |
| dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml. |
| xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test). |
| dropDirectoryName: path to directory containing the result of the build. |
| testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results |
| testResultsHtmlFileName: name of file which will be generated with links to JUnit test results |
| dropHtmlFileName: name of generated index page |
| hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results |
| hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs |
| testManifestFileName: name of xml file containing descriptions of zip types and log files |
| |
| |
| |
| --> |
| <property file="${buildDirectory}/maps/org.eclipse.dltk/releng.maps/maps/dependencies.properties" /> |
| |
| <!-- create tables of test plugin compiles first --> |
| <summarizeResults isBuildTested="false" |
| includeAll="true" |
| dropTokenList="${dropTokenList}" |
| xmlDirectoryName="" |
| dropDirectoryName="${resultDir}" |
| testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template" |
| testResultsHtmlFileName="testCompileResults.php" |
| hrefTestResultsTargetPath="" |
| hrefCompileLogsTargetPath="testcompilelogs" |
| compileLogsDirectoryName="${resultDir}/testcompilelogs" /> |
| |
| <xslt |
| basedir="${resultDir}/testcompilelogs" |
| destdir="${resultDir}/testcompilelogs" |
| includes="**/*.bin.xml" |
| scanincludeddirectories="true" |
| style="compilerXMLOutputToHTML.xsl" |
| force="true" /> |
| |
| <!-- create table of code plugins compiles --> |
| <summarizeResults isBuildTested="false" |
| includeAll="true" |
| dropTokenList="${dropTokenList}" |
| xmlDirectoryName="" |
| dropDirectoryName="${resultDir}" |
| testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template" |
| testResultsHtmlFileName="compileResults.php" |
| hrefTestResultsTargetPath="testResults/html" |
| hrefCompileLogsTargetPath="compilelogs" |
| compileLogsDirectoryName="${resultDir}/compilelogs" /> |
| |
| |
| <xslt |
| basedir="${resultDir}/compilelogs" |
| destdir="${resultDir}/compilelogs" |
| includes="**/*.bin.xml" |
| scanincludeddirectories="true" |
| style="compilerXMLOutputToHTML.xsl" |
| force="true" /> |
| |
| <tstamp> |
| <format property="TODAY" |
| pattern="MMMM d, yyyy" /> |
| </tstamp> |
| |
| <!-- Insert Build Type descriptor --> |
| <antcall target="${buildType}" /> |
| |
| <!-- Insert Build Date --> |
| <replace file="${resultingIndex}" token="@date@" value="${TODAY}" /> |
| |
| <!-- Insert Build Name --> |
| <replace file="${resultingIndex}" token="@build@" value="${buildLabel}" /> |
| |
| <!-- Insert Mirror Name --> |
| <!-- |
| <replace file="${resultingIndex}" |
| token="@mirror@" |
| value="\${downloadprefix}" /> |
| --> |
| <!-- value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" /> --> |
| |
| <!-- Insert PreRequsites --> |
| |
| <!-- eclipse --> |
| <replace file="${resultingIndex}" token="@eclipseFile@" value="${eclipse.file.linux-gtk-x86}" /> |
| <replace file="${resultingIndex}" token="@eclipseURL@" value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" /> |
| <replace file="${resultingIndex}" token="@eclipseBuildURL@" value="${eclipse.url}" /> |
| <!-- RSE --> |
| <replace file="${resultingIndex}" token="@rseFile@" value="${rse.file}" /> |
| <replace file="${resultingIndex}" token="@rseURL@" value="${rse.url}/${rse.file}" /> |
| <!-- EMF --> |
| <replace file="${resultingIndex}" token="@emfFile@" value="${emf.file}" /> |
| <replace file="${resultingIndex}" token="@emfURL@" value="${emf.url}/${emf.file}" /> |
| <!--DERBY--> |
| <replace file="${resultingIndex}" token="@dearbyFile@" value="${dearby.file}" /> |
| <replace file="${resultingIndex}" token="@dearbyURL@" value="${dearby.url}/${dearby.file}" /> |
| <!-- EMF-XSD --> |
| <!--replace file="${resultingIndex}" token="@xsdFile@" value="${emf_xsd.file}" /--> |
| <!--replace file="${resultingIndex}" token="@xsdURL@" value="${emf_xsd.url}/${emf_xsd.file}" /--> |
| <!-- GEF - TODO why is it here ? --> |
| <replace file="${resultingIndex}" token="@gefFile@" value="${gef.file}" /> |
| <replace file="${resultingIndex}" token="@gefURL@" value="${gef.url}/${gef.file}" /> |
| <!-- JEM - TODO why is it here ? --> |
| <replace file="${resultingIndex}" token="@jemFile@" value="${jem.file}" /> |
| <replace file="${resultingIndex}" token="@jemURL@" value="${jem.url}/${jem.file}" /> |
| <!-- |
| these token/s should not exist in maintenance stream, but |
| no harm done, so in the interests of keeping builder |
| streams in sync, we'll leave them here as place hold |
| --> |
| <!-- DTP - TODO why is it here ? --> |
| <replace file="${resultingIndex}" token="@dtpFile@" value="${dtp.file}" /> |
| <replace file="${resultingIndex}" token="@dtpURL@" value="${dtp.url}/${dtp.file}" /> |
| |
| <mkdir dir="${resultDir}/whatisfixed" /> |
| <echo file="${resultDir}/whatisfixed/buglog.html" |
| append="true"> |
| what is fixed list is not available yet! |
| </echo> |
| |
| <!-- Update timestamp on file to permit overwrite through Ant copy task --> |
| <touch file="${resultingIndex}" /> |
| </target> |
| |
| <target name="generateJUnitTestsIndex" depends="checkIfTested" if="doTests"> |
| |
| <!-- |
| isBuildTested: true|false should JUnit plugin test results be used to generate index page |
| dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml. |
| xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test). |
| dropDirectoryName: path to directory containing the result of the build. |
| testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results |
| testResultsHtmlFileName: name of file which will be generated with links to JUnit test results |
| dropHtmlFileName: name of generated index page |
| hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results |
| hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs |
| testManifestFileName: name of xml file containing descriptions of zip types and log files |
| |
| |
| |
| --> |
| <property file="${buildDirectory}/maps/org.eclipse.dltk/releng.maps/maps/dependencies.properties" /> |
| <!-- create table of test plugin compiles first --> |
| <!-- set isBuildTested to true for the "compile only" results --> |
| |
| <summarizeResults isBuildTested="true" |
| dropTokenList="${dropTokenList}" |
| dropDirectoryName="${resultDir}" |
| xmlDirectoryName="${resultDir}/testResults/xml" |
| testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template" |
| testResultsHtmlFileName="testResults.php" |
| hrefTestResultsTargetPath="testResults/html" |
| compileLogsDirectoryName=""/> |
| |
| |
| <tstamp> |
| <format property="TODAY" |
| pattern="MMMM d, yyyy" /> |
| </tstamp> |
| |
| <!-- Insert Build Type descriptor --> |
| <antcall target="${buildType}" /> |
| |
| <!-- Insert Build Date --> |
| <replace file="${resultingIndex}" token="@date@" value="${TODAY}" /> |
| |
| <!-- Insert Build Name --> |
| <replace file="${resultingIndex}" token="@build@" value="${buildLabel}" /> |
| |
| <!-- Insert Mirror Name --> |
| <replace file="${resultingIndex}" token="@mirror@" value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" /> |
| |
| <!-- Insert PreRequsites --> |
| |
| <!-- Eclipse --> |
| <replace file="${resultingIndex}" token="@eclipseFile@" value="${eclipse.file.linux-gtk-x86}" /> |
| <replace file="${resultingIndex}" token="@eclipseURL@" value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" /> |
| <replace file="${resultingIndex}" token="@eclipseBuildURL@" value="${eclipse.url}" /> |
| <!-- EMF --> |
| <replace file="${resultingIndex}" token="@emfFile@" value="${emf.file}" /> |
| <replace file="${resultingIndex}" token="@emfURL@" value="${emf.url}/${emf.file}" /> |
| <!--DEARBY--> |
| <replace file="${resultingIndex}" token="@dearbyFile@" value="${dearby.file}" /> |
| <replace file="${resultingIndex}" token="@dearbyURL@" value="${dearby.url}/${dearby.file}" /> |
| <!-- EMF-XSD --> |
| <!--replace file="${resultingIndex}" token="@xsdFile@" value="${emf_xsd.file}" /--> |
| <!--replace file="${resultingIndex}" token="@xsdURL@" value="${emf_xsd.url}/${emf_xsd.file}" /--> |
| <!-- GEF --> |
| <replace file="${resultingIndex}" token="@gefFile@" value="${gef.file}" /> |
| <replace file="${resultingIndex}" token="@gefURL@" value="${gef.url}/${gef.file}" /> |
| <!-- JEM --> |
| <replace file="${resultingIndex}" token="@jemFile@" value="${jem.file}" /> |
| <replace file="${resultingIndex}" token="@jemURL@" value="${jem.url}/${jem.file}" /> |
| <!-- |
| these token/s should not exist in maintenance stream, but |
| no harm done, so in the interests of keeping builder |
| streams in sync, we'll leave them here as place hold |
| --> |
| <replace file="${resultingIndex}" |
| token="@dtpFile@" |
| value="${dtp.file}" /> |
| <replace file="${resultingIndex}" |
| token="@dtpURL@" |
| value="${dtp.url}/${dtp.file}" /> |
| |
| <mkdir dir="${resultDir}/whatisfixed" /> |
| <echo file="${resultDir}/whatisfixed/buglog.html" |
| append="true"> |
| what is fixed list is not available yet! |
| </echo> |
| |
| <!-- Update timestamp on file to permit overwrite through Ant copy task --> |
| <touch file="${resultingIndex}" /> |
| </target> |
| |
| <target name="getStaticFiles"> |
| <!--get static files required in the buildLabel directory--> |
| <copy todir="${resultDir}"> |
| <fileset dir="${templateDir}/staticDropFiles" /> |
| </copy> |
| |
| <!--copy buildnotes from plugin directories--> |
| <mkdir dir="${resultDir}/buildnotes" /> |
| <copy todir="${resultDir}/buildnotes" flatten="true"> |
| <fileset dir="${buildDirectory}/plugins" |
| includes="**/buildnotes_*.html" /> |
| </copy> |
| |
| |
| <copy file="${templateDir}/staticDropFiles/logIndex.php" tofile="${resultDir}/testResults/consolelogs/full/logIndex.php" /> |
| <copy file="${templateDir}/staticDropFiles/logIndex.php" tofile="${resultDir}/testResults/consolelogs/testLogs/logIndex.php" /> |
| <copy file="${templateDir}/staticDropFiles/logIndex.php" tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php" /> |
| |
| |
| </target> |
| |
| <target name="updateSite"> |
| |
| |
| <!-- get our authored, tokenized site.xml file --> |
| <echo message = "Generating site.xml from: ${dltk.builder.home}/distribution/dltk.site/templateFiles/siteDLTK.xml..." /> |
| <copy file="${dltk.builder.home}/distribution/dltk.site/templateFiles/siteDLTK.xml" |
| tofile="${buildDirectory}/${buildLabel}/updateSite/site.xml" overwrite="true" failonerror="true"/> |
| <!-- get the ${buildDirectory}/finalPluginsVersions.properties, and |
| read as properties --> |
| <!-- substitute property value for tokens --> |
| <replace file="${buildDirectory}/${buildLabel}/updateSite/site.xml" |
| propertyfile="${buildDirectory}/finalFeaturesVersions.properties" > |
| <replacefilter token="@org.eclipse.dltk.core@" |
| property="org.eclipse.dltk.core" /> |
| <replacefilter token="@org.eclipse.dltk.core.sdk@" |
| property="org.eclipse.dltk.core.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.ruby@" |
| property="org.eclipse.dltk.ruby" /> |
| <replacefilter token="@org.eclipse.dltk.ruby.sdk@" |
| property="org.eclipse.dltk.ruby.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.tcl@" |
| property="org.eclipse.dltk.tcl" /> |
| <replacefilter token="@org.eclipse.dltk.tcl.sdk@" |
| property="org.eclipse.dltk.tcl.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.python@" |
| property="org.eclipse.dltk.python" /> |
| <replacefilter token="@org.eclipse.dltk.python.sdk@" |
| property="org.eclipse.dltk.python.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.javascript@" |
| property="org.eclipse.dltk.javascript" /> |
| <replacefilter token="@org.eclipse.dltk.javascript.sdk@" |
| property="org.eclipse.dltk.javascript.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.xotcl@" |
| property="org.eclipse.dltk.xotcl" /> |
| <replacefilter token="@org.eclipse.dltk.xotcl.sdk@" |
| property="org.eclipse.dltk.xotcl.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.itcl@" |
| property="org.eclipse.dltk.itcl" /> |
| <replacefilter token="@org.eclipse.dltk.itcl.sdk@" |
| property="org.eclipse.dltk.itcl.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.rse@" |
| property="org.eclipse.dltk.rse" /> |
| <replacefilter token="@org.eclipse.dltk.rse.sdk@" |
| property="org.eclipse.dltk.rse.sdk" /> |
| <replacefilter token="@org.eclipse.dltk.mylyn@" |
| property="org.eclipse.dltk.mylyn" /> |
| <replacefilter token="@org.eclipse.dltk.mylyn.sdk@" |
| property="org.eclipse.dltk.mylyn.sdk" /> |
| </replace> |
| <echo message = "Done site.xml: ${buildDirectory}/${buildLabel}/updateSite/site.xml" /> |
| </target> |
| |
| <target name="digest"> |
| |
| <echo message="baseDir: ${basedir}"/> |
| |
| <property file="${dltk.builder.home}/build.properties" /> |
| <property name="pde.builder.path" value="${env.BUILD_HOME}/builders/${eclipse.builder.version}/${eclipse.builder}" /> |
| <echo message="pde.builder.path: ${pde.builder.path}" /> |
| <echo message="eclipse.builder.version: ${eclipse.builder.version}" /> |
| <echo message="eclipse.builder: ${eclipse.builder}" /> |
| |
| <echo message="Running site digesting..."/> |
| <java |
| jar="${pde.builder.path}/plugins/org.eclipse.equinox.launcher.jar" |
| fork="true" |
| jvm="${env.JAVA_5_HOME}/bin/java" |
| failonerror="true" |
| maxmemory="256m" |
| dir="${buildDirectory}"> |
| <arg |
| line="${logIfDebug}" /> |
| <arg |
| line="-application org.eclipse.update.core.siteOptimizer" /> |
| <arg |
| line="-digestBuilder -digestOutputDir=${buildDirectory}/${buildLabel}/updateSite/ -siteXML=${buildDirectory}/${buildLabel}/updateSite/site.xml"/> |
| <!--arg |
| line="-jarProcessor ${verboseIfDebug} -outputDir ${buildDirectory}/${buildLabel}/updateSite -pack ${buildDirectory}/${buildLabel}/updateSite"/--> |
| </java> |
| <echo message="Done site digesting"/> |
| </target> |
| |
| <target name="countFiles"> |
| <!-- |
| files.count is a file that should exist in the drop directory with a count of the zip files in the same directory. |
| It is required to generate a link to the build on the downloads page. |
| --> |
| |
| <countBuildFiles sourceDirectory="${resultDir}" |
| filterString=".zip,.tar.gz" |
| outputFile="${resultDir}/files.count" /> |
| |
| </target> |
| |
| <!--Build type descriptors--> |
| <target name="I"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Integration" /> |
| </target> |
| |
| <target name="S"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Stable" /> |
| </target> |
| |
| <target name="N"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Nightly" /> |
| </target> |
| |
| <target name="M"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Maintenance" /> |
| </target> |
| |
| <target name="R"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Release" /> |
| </target> |
| |
| |
| <target name="T"> |
| <replace file="${resultingIndex}" |
| token="%dltkandprereqs%" |
| value=" " /> |
| <replace file="${resultingIndex}" |
| token="@type@" |
| value="Test" /> |
| </target> |
| |
| |
| <target name="checkIfTested"> |
| <echo message="isBuildTested: ${isBuildTested}" /> |
| <condition property="doTests"> |
| <equals arg1="${isBuildTested}" |
| arg2="true" |
| trim="true" |
| casesensitive="false" /> |
| </condition> |
| </target> |
| |
| |
| </project> |