зеркало из https://github.com/mozilla/gecko-dev.git
Build modifications to make Context.getImplementationVersion() to return string defined in build property files with automatic timestamping.
This commit is contained in:
Родитель
c7b18deb40
Коммит
a480374b2f
|
@ -33,6 +33,8 @@
|
|||
name: rhino
|
||||
Name: Rhino
|
||||
version: 1_6R1
|
||||
# See Context#getImplementationVersion() for format of this!
|
||||
implementation.version: Rhino 1.6 release 1_pre_RC2 ${implementation.date}
|
||||
|
||||
build.dir: build
|
||||
rhino.jar: js.jar
|
||||
|
|
|
@ -8,6 +8,10 @@ Requires Ant version 1.2 or later
|
|||
<project name="Rhino" default="help" basedir=".">
|
||||
|
||||
<target name="properties">
|
||||
<tstamp>
|
||||
<!-- Specify date part of Context#getImplementationVersion() -->
|
||||
<format property="implementation.date" pattern="yyyy MM dd"/>
|
||||
</tstamp>
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="dist.file" value="rhino${version}.zip"/>
|
||||
|
@ -88,7 +92,6 @@ Requires Ant version 1.2 or later
|
|||
</target>
|
||||
|
||||
<target name="copy-misc" depends="init">
|
||||
<tstamp/>
|
||||
<filter token="datestamp" value="${TODAY}"/>
|
||||
<copy todir="${dist.dir}" filtering="yes">
|
||||
<fileset dir=".">
|
||||
|
@ -110,7 +113,7 @@ Requires Ant version 1.2 or later
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="javadoc" depends="compile,copy-docs">
|
||||
<target name="javadoc" depends="copy-docs">
|
||||
<mkdir dir="${dist.dir}/docs/apidocs"/>
|
||||
<javadoc sourcefiles="${apiClasses}"
|
||||
sourcepath="src"
|
||||
|
|
|
@ -19,6 +19,10 @@ Requires Ant version 1.2
|
|||
</javac>
|
||||
<copy todir="${classes}">
|
||||
<fileset dir="src" includes="org/**/*.properties" />
|
||||
<filterset>
|
||||
<filter token="IMPLEMENTATION.VERSION"
|
||||
value="${implementation.version}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
|
|
@ -752,10 +752,16 @@ public class Context
|
|||
* @return a string that encodes the product, language version, release
|
||||
* number, and date.
|
||||
*/
|
||||
public final String getImplementationVersion()
|
||||
{
|
||||
return "Rhino 1.6 release 1 2004 08 11";
|
||||
}
|
||||
public final String getImplementationVersion()
|
||||
{
|
||||
// XXX Probably it would be better to embed this directly into source
|
||||
// with special build preprocessing but that would require some ant
|
||||
// tweaking and then replacing token in resource files was simpler
|
||||
if (implementationVersion == null) {
|
||||
implementationVersion = getMessage0("implementation.version");
|
||||
}
|
||||
return implementationVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current error reporter.
|
||||
|
@ -2585,6 +2591,8 @@ public class Context
|
|||
}
|
||||
}
|
||||
|
||||
private static String implementationVersion;
|
||||
|
||||
private ContextFactory factory;
|
||||
private boolean sealed;
|
||||
private Object sealKey;
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
# the provisions above, a recipient may use your version of this
|
||||
# file under either the NPL or the GPL.
|
||||
|
||||
# This is replaced during jar assembly from property string
|
||||
# and should not be translated
|
||||
implementation.version = @IMPLEMENTATION.VERSION@
|
||||
|
||||
#
|
||||
# To add JavaScript error messages for a particular locale, create a
|
||||
# new Messages_[locale].properties file, where [locale] is the Java
|
||||
|
|
Загрузка…
Ссылка в новой задаче