|
From: <li...@vu...> - 2017-09-01 08:44:39
|
Revision: 44242
Author: liviu
Date: 2017-09-01 08:25:34 +0000 (Fri, 01 Sep 2017)
Log Message:
-----------
changing the build process to allow easier and faster building using CI
Modified Paths:
--------------
client/trunk/azureus2/src/org/gudy/azureus2/core3/util/Constants.java
client/trunk/build.xml
Modified: client/trunk/azureus2/src/org/gudy/azureus2/core3/util/Constants.java
===================================================================
--- client/trunk/azureus2/src/org/gudy/azureus2/core3/util/Constants.java 2017-04-25 20:28:32 UTC (rev 44241)
+++ client/trunk/azureus2/src/org/gudy/azureus2/core3/util/Constants.java 2017-09-01 08:25:34 UTC (rev 44242)
@@ -140,10 +140,10 @@
public static final String AZUREUS_NAME = "Azureus";
public static final String AZUREUS_PROTOCOL_NAME_PRE_4813 = "Azureus";
public static final String AZUREUS_PROTOCOL_NAME = "Vuze";
- public static final String AZUREUS_VERSION = "5.7.5.1_CVS";
+ public static final String AZUREUS_VERSION = "5.7.5.1";
public static final String BUILD_VERSION = "@build.version@"; //Ant replace
public static final String AZUREUS_SUBVER = "";
- public static final byte[] VERSION_ID = ("-" + "AZ" + "5751" + "-").getBytes(); //MUST be 8 chars long!
+ public static final byte[] VERSION_ID = ("-" + "AZ" + AZUREUS_VERSION.replace('.', '') + "-").getBytes(); //MUST be 8 chars long!
private static final boolean FORCE_NON_CVS = System.getProperty( "az.force.noncvs", "0" ).equals( "1" );
Modified: client/trunk/build.xml
===================================================================
--- client/trunk/build.xml 2017-04-25 20:28:32 UTC (rev 44241)
+++ client/trunk/build.xml 2017-09-01 08:25:34 UTC (rev 44242)
@@ -11,12 +11,7 @@
<property name="build.properties" value="${build.props.file}"/>
<property file="${build.properties}" />
<echo message="using.ext.props = ${using.ext.props}" />
-
-
- <!-- Default variables -->
- <property name="major.ver" value="0000"/>
- <property name="minor.ver" value="00"/>
- <property name="build.ver" value="${major.ver}-${minor.ver}"/>
+
<property name="build.name" value="Vuze_${build.ver}" />
<property name="azureus2.dir" value="azureus2"/>
@@ -27,10 +22,44 @@
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
-
-
+
+ <!-- Default variables -->
+ <property name="major.ver" value="0000"/>
+ <property name="minor.ver" value="00"/>
+ <property name="build.ver" value="${major.ver}-${minor.ver}"/>
+
+ <!-- Read the version line from Constants.java in a property -->
+ <target name="loadVersionLine">
+ <loadfile property="versionLine" srcfile="${azureus2.dir}/src/org/gudy/azureus2/core3/util/Constants.java">
+ <filterchain>
+ <linecontainsregexp>
+ <regexp pattern=' public static final String AZUREUS_VERSION = "(.*)";'/>
+ </linecontainsregexp>
+ </filterchain>
+ </loadfile>
+ </target>
+
+ <target name="extractVersionFromVersionLine" depends="loadVersionLine">
+
+ <property name="versionLineBeforeExtract" value="${versionLine}"/>
+ <script language="javascript">
+ var regexp = '"(.*)"';
+ var before = project.getProperty("versionLineBeforeExtract");
+ var majorVersion = before.match(regexp)[1];
+ project.setProperty("major.ver", majorVersion);
+ </script>
+ <echo>after=${major.ver}</echo>
+ </target>
+
+
+
<!-- REUSABLE REFERENCES -->
-
+
+
+ <target name="setMajorVersion" depends="extractVersionFromVersionLine">
+ <echo message="BUILDING: ${major.ver}" />
+ </target>
+
<path id="build.classpath">
<fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
<fileset dir="${azureus3.dir}/lib" includes="*.jar" />
@@ -63,7 +92,8 @@
</target>
- <target name="init">
+ <target name="init" depends="setMajorVersion">
+
<echo message="BUILDING: ${ant.project.name} [${ant.file}] [${build.props.file}]"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
|