change(web): better 'keyman.build' assignment (for unmini'd)

This commit is contained in:
jahorton 2020-01-31 12:50:20 +07:00
parent 77d441f0c1
commit 2f3be18779
2 changed files with 4 additions and 7 deletions

View file

@ -314,6 +314,7 @@ generate_environment_ts_file ( ) {
echo "//Autogenerated file - do not modify!
namespace com.keyman.environment {
export var VERSION = \"$VERSION_RELEASE\";
export var BUILD = $VERSION_PATCH;
}
" >> $ENVIRONMENT_FILE
}
@ -348,7 +349,7 @@ if [ $BUILD_EMBED = true ]; then
rm $EMBED_OUTPUT/keyman.js 2>/dev/null
minify keyman.js $EMBED_OUTPUT SIMPLE_OPTIMIZATIONS "KeymanBase.__BUILD__=$VERSION_PATCH"
minify keyman.js $EMBED_OUTPUT SIMPLE_OPTIMIZATIONS
assert $EMBED_OUTPUT/keyman.js
echo Compiled embedded application saved as $EMBED_OUTPUT/keyman.js
@ -382,7 +383,7 @@ if [ $BUILD_COREWEB = true ]; then
rm $WEB_OUTPUT/keymanweb.js 2>/dev/null
echo Minifying KeymanWeb...
minify keymanweb.js $WEB_OUTPUT SIMPLE_OPTIMIZATIONS "KeymanBase.__BUILD__=$VERSION_PATCH"
minify keymanweb.js $WEB_OUTPUT SIMPLE_OPTIMIZATIONS
assert $WEB_OUTPUT/keymanweb.js
echo Compiled KeymanWeb application saved as $WEB_OUTPUT/keymanweb.js

View file

@ -63,7 +63,6 @@ namespace com.keyman {
static _srcPath: string;
static _rootPath: string;
static _protocol: string;
static __BUILD__: number;
// Internal objects
['util']: Util;
@ -127,7 +126,7 @@ namespace com.keyman {
this.osk = this['osk'] = new com.keyman.osk.OSKManager();
// Load properties from their static variants.
this['build'] = KeymanBase.__BUILD__;
this['build'] = com.keyman.environment.BUILD;
this.srcPath = KeymanBase._srcPath;
this.rootPath = KeymanBase._rootPath;
this.protocol = KeymanBase._protocol;
@ -622,9 +621,6 @@ KeymanBase._srcPath = sPath;
KeymanBase._rootPath = sPath.replace(/(https?:\/\/)([^\/]*)(.*)/,'$1$2/');
KeymanBase._protocol = sPath.replace(/(.{3,5}:)(.*)/,'$1');
/** @define {number} build counter that gets set by the build environment */
KeymanBase.__BUILD__ = 299;
/**
* Base code: Declare major component namespaces, instances, and utility functions
*/