Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2010-07-07 16:35:14 +0000
committerSilenio Quarti2010-07-07 16:35:14 +0000
commit5e0d4278cad63976aba4e7a1a4c5e05afbfe1a87 (patch)
tree82847d6f5e84fa8f47390ccee1f9e5fbb5813249 /bundles/org.eclipse.swt/tasks
parent5745e3079b653c5490cdb5f26128493be4e78af0 (diff)
downloadeclipse.platform.swt-5e0d4278cad63976aba4e7a1a4c5e05afbfe1a87.tar.gz
eclipse.platform.swt-5e0d4278cad63976aba4e7a1a4c5e05afbfe1a87.tar.xz
eclipse.platform.swt-5e0d4278cad63976aba4e7a1a4c5e05afbfe1a87.zip
new release task
Diffstat (limited to 'bundles/org.eclipse.swt/tasks')
-rw-r--r--bundles/org.eclipse.swt/tasks/build.xml52
1 files changed, 52 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/tasks/build.xml b/bundles/org.eclipse.swt/tasks/build.xml
index 043c6625d7..5bb87598b4 100644
--- a/bundles/org.eclipse.swt/tasks/build.xml
+++ b/bundles/org.eclipse.swt/tasks/build.xml
@@ -678,6 +678,19 @@
</target>
<!-- common build tasks -->
+ <target name="new_release">
+ <property name="tmpdir" value="${tmphome}/new_release"/>
+ <delete dir="${tmpdir}" quiet="true"/>
+ <mkdir dir="${tmpdir}"/>
+ <antcall target="new_release_imp"/>
+ <delete dir="${tmpdir}" quiet="true"/>
+ </target>
+
+ <target name="new_release_imp" depends="get_new_release_version">
+ <property name="natives_changed" value="true"/>
+ <antcall target="increment_version_imp"/>
+ </target>
+
<target name="increment_version">
<property name="tmpdir" value="${tmphome}/inc"/>
<delete dir="${tmpdir}" quiet="true"/>
@@ -706,6 +719,8 @@
</cvs>
<!-- Update the files -->
+ <replace file="${tmpdir}/${library_j2se}" token="MAJOR_VERSION = ${maj_ver}" value="MAJOR_VERSION = ${new_maj_ver}"/>
+ <replace file="${tmpdir}/${library_j2me}" token="MAJOR_VERSION = ${maj_ver}" value="MAJOR_VERSION = ${new_maj_ver}"/>
<replace file="${tmpdir}/${library_j2se}" token="MINOR_VERSION = ${min_ver}" value="MINOR_VERSION = ${new_min_ver}"/>
<replace file="${tmpdir}/${library_j2me}" token="MINOR_VERSION = ${min_ver}" value="MINOR_VERSION = ${new_min_ver}"/>
<replace file="${tmpdir}/${version_file}" token="version ${maj_ver}.${min_ver}" value="version ${maj_ver}.${new_min_ver}"/>
@@ -843,6 +858,43 @@
<echo>Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver}</echo>
</target>
+ <target name="get_new_release_version" unless="min_ver">
+ <property name="tmpdir" value="."/>
+ <property name="cvsRsh" value="plink"/>
+ <property name="make_common" value="org.eclipse.swt/Eclipse SWT/common/library/make_common.mak"/>
+ <cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+ <commandline>
+ <argument value="checkout"/>
+ <argument line="${TAG}"/>
+ <argument value="${make_common}"/>
+ </commandline>
+ </cvs>
+
+ <loadproperties srcFile="${tmpdir}/${make_common}"/>
+ <script language="javascript">
+ <![CDATA[
+ min_ver = project.getProperty("min_ver");
+ maj_ver = project.getProperty("maj_ver");
+ new_min_ver = ((parseInt(min_ver) / 100) + 1) * 100;
+ new_maj_ver = maj_ver;
+ if (new_min_ver >= 1000) {
+ new_min_ver = "000";
+ new_maj_ver = parseInt(new_maj_ver) + 1;
+ }
+ project.setProperty("new_min_ver", new_min_ver);
+ project.setProperty("new_maj_ver", new_maj_ver);
+ ]]>
+ </script>
+ <property name="swt_version" value="${maj_ver}${min_ver}"/>
+ <property name="new_version" value="${new_maj_ver}${new_min_ver}"/>
+ <copy file="${tmpdir}/${make_common}" tofile="${tmpdir}/tmp.txt" overwrite="true"/>
+ <replace file="${tmpdir}/tmp.txt" token="comma_ver=${comma_ver}" value="new_comma_ver=${new_version}"/>
+ <replaceregexp file="${tmpdir}/tmp.txt" match="new_comma_ver=(\d)(\d)(\d)(\d)" replace="new_comma_ver=\1,\2,\3,\4" byline="true"/>
+ <loadproperties srcFile="${tmpdir}/tmp.txt"/>
+ <delete file="${tmpdir}/tmp.txt"/>
+ <echo>Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver}</echo>
+ </target>
+
<!-- Set natives_changed if there are changes in the C code -->
<target name="check_natives_changed" unless="natives_changed" depends="get_tag">
<property name="tmpdir" value="."/>

Back to the top