diff --git a/web/source/build.sh b/web/source/build.sh index bda0ddc5d2..a569033e7c 100755 --- a/web/source/build.sh +++ b/web/source/build.sh @@ -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 diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index 292bca8638..f203cf106f 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -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 */