diff options
author | Lakshmi Shanmugam | 2015-12-14 18:19:39 +0000 |
---|---|---|
committer | Lakshmi Shanmugam | 2015-12-14 18:19:39 +0000 |
commit | 45d27ffdee731d04a7b288f0bb0d96cd57613788 (patch) | |
tree | 4382b33f02984c591eb594797b58fbea47841c50 | |
parent | 42939902a7cd0e698c145625d14ef3b7a866cfe3 (diff) | |
download | eclipse.platform.swt-45d27ffdee731d04a7b288f0bb0d96cd57613788.tar.gz eclipse.platform.swt-45d27ffdee731d04a7b288f0bb0d96cd57613788.tar.xz eclipse.platform.swt-45d27ffdee731d04a7b288f0bb0d96cd57613788.zip |
Bug 477711 - Build input script should not create new SWT version if
nothing has changed
-rw-r--r-- | bundles/org.eclipse.swt/buildInternal.xml | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/bundles/org.eclipse.swt/buildInternal.xml b/bundles/org.eclipse.swt/buildInternal.xml index 11fe0cce0b..1caf676d9d 100644 --- a/bundles/org.eclipse.swt/buildInternal.xml +++ b/bundles/org.eclipse.swt/buildInternal.xml @@ -19,27 +19,24 @@ --> <project name="swtinternalbuild" basedir="."> - - <property name="repo.src" value="../../../eclipse.platform.swt"/> - <property name="repo.bin" value="../../../eclipse.platform.swt.binaries"/> + <import file="buildSWT.xml"/> <property name="file_src_pom" value="bundles/org.eclipse.swt/pom.xml"/> <property name="file_bin_parent_pom" value="bundles/binaries-parent/pom.xml"/> <property name="lib.dir" value="/var/lib/hudson/antlib"/> - <property name="tmphome" value="../../../tmp"/> - + <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> <classpath> <pathelement location="${lib.dir}/xmltask.jar"/> </classpath> </taskdef> - <!-- generates the time-stamp qualifiers and updates the pom files in source and binaries repo--> + <!-- When there are source changes, generates the time-stamp qualifiers and updates the pom files in source and binaries repo --> <target name="generate_qualifier" depends="check_source_changed" if="source_changed"> <tstamp><format property="build.qualifier" pattern="yyyyMMdd-HHmm"/></tstamp> <echo>${build.qualifier}</echo> </target> - <target name="write_qualifier" depends="generate_qualifier" description="writes the generated qualifier in pom.xml in src and binaries repo"> + <target name="write_qualifier" depends="generate_qualifier" if="build.qualifier" description="writes the generated qualifier in pom.xml in src and binaries repo"> <xmltask source="${repo.src}/${file_src_pom}" dest="${repo.src}/${file_src_pom}" failWithoutMatch="true"> <replace path="/:project/:properties/:forceContextQualifier/text()" withText="v${build.qualifier}"/> </xmltask> @@ -47,33 +44,4 @@ <replace path="/:project/:properties/:forceContextQualifier/text()" withText="v${build.qualifier}"/> </xmltask> </target> - - <target name="check_source_sha1_file" unless="source_changed"> - <property name="sha1_file" value="${tmphome}/build.sha1"/> - <condition property="source_changed"> - <not> - <available file="${sha1_file}" type="file"/> - </not> - </condition> - <echo>"Has source changes: ${source_changed}"</echo> - </target> - - <target name="check_source_changed" depends="check_source_sha1_file" unless="source_changed"> - <loadproperties srcfile="${sha1_file}"/> - - <!-- Check for changes --> - <exec dir="${repo.src}" executable="git" failonerror="true" outputproperty="diffs"> - <arg line="diff ${SHA1}"/> - </exec> - <condition property="source_changed"> - <or> - <length string="${SHA1}" trim="true" when="equal" length="0"/> - <length string="${diffs}" trim="true" when="greater" length="0"/> - </or> - </condition> - <echo>Has source changes: ${source_changed}, compared against:</echo> - <exec dir="${repo.src}" executable="git" failonerror="true"> - <arg line="log -1 ${SHA1}"/> - </exec> - </target> </project> |