From 766c3765bd30e6a643eff99da0f1c293aa2897bd Mon Sep 17 00:00:00 2001 From: John Resig Date: Tue, 10 Oct 2006 00:23:18 +0000 Subject: [PATCH] Now have accurate version information built into jquery.js - will build it into the docs and test suite next. --- Makefile | 5 ++++- build/docs/docs.js | 2 +- src/jquery/jquery.js | 6 +++--- version.txt | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 version.txt diff --git a/Makefile b/Makefile index 45453f667..a906d0bf8 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ JQ = ${DIST_DIR}/jquery.js JQ_LITE = ${DIST_DIR}/jquery.lite.js JQ_PACK = ${DIST_DIR}/jquery.pack.js +JQ_VER = `cat version.txt` +VER = sed s/@VERSION/${JQ_VER}/ + JAR = java -jar ${BUILD_DIR}/js.jar all: jquery lite pack docs test @@ -31,7 +34,7 @@ ${JQ}: ${MODULES} @@echo "Building" ${JQ} @@mkdir -p ${DIST_DIR} - @@cat ${MODULES} > ${JQ}; + @@cat ${MODULES} | ${VER} > ${JQ}; @@echo ${JQ} "Built" @@echo diff --git a/build/docs/docs.js b/build/docs/docs.js index 8f331ea3e..500b91c14 100644 --- a/build/docs/docs.js +++ b/build/docs/docs.js @@ -17,7 +17,7 @@ function output( c, n ) { Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 }; var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" ); - + writeFile( dir + "/data/jquery-" + n + "-xml.xml", "\n" + xml ); diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 341bd8813..ab7564fd7 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1,5 +1,5 @@ /* - * jQuery - New Wave Javascript + * jQuery @VERSION - New Wave Javascript * * Copyright (c) 2006 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) @@ -190,7 +190,7 @@ var $ = jQuery; jQuery.fn = jQuery.prototype = { /** - * The current SVN version of jQuery. + * The current version of jQuery. * * @private * @property @@ -198,7 +198,7 @@ jQuery.fn = jQuery.prototype = { * @type String * @cat Core */ - jquery: "$Rev$", + jquery: "@VERSION", /** * The number of elements currently matched. diff --git a/version.txt b/version.txt new file mode 100644 index 000000000..6d7de6e6a --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.0.2 -- 2.39.5