From cb64708cae8a1bcf3bb137401958449aa041d8c3 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Thu, 7 Feb 2013 16:33:20 -0800 Subject: [PATCH] CURRENT_VERSION -> ENGINE_VERSION --- lib/meteor.js | 3 ++- lib/update.js | 4 ++-- lib/updater.js | 2 +- tools/admin/increment-version.js | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/meteor.js b/lib/meteor.js index 64f3a7e659..f20ab5a610 100644 --- a/lib/meteor.js +++ b/lib/meteor.js @@ -695,7 +695,8 @@ Fiber(function () { var updater = require(path.join(__dirname, 'updater.js')); var sha = updater.git_sha(); - process.stdout.write("Meteor version " + updater.CURRENT_VERSION); + // XXX print release version + process.stdout.write("Engine version " + updater.ENGINE_VERSION); if (files.in_checkout()) process.stdout.write(" (git checkout)"); diff --git a/lib/update.js b/lib/update.js index f9e300384b..cac1916ea4 100644 --- a/lib/update.js +++ b/lib/update.js @@ -30,10 +30,10 @@ updater.get_manifest(function (manifest) { } if (!updater.needs_upgrade(manifest)) { - if (manifest.version === updater.CURRENT_VERSION) { + if (manifest.version === updater.ENGINE_VERSION) { console.log("Already at current version: " + manifest.version); } else { - console.log("Not upgrading. Your version: " + updater.CURRENT_VERSION + console.log("Not upgrading. Your version: " + updater.ENGINE_VERSION + ". New version: " + manifest.version + "."); } return; diff --git a/lib/updater.js b/lib/updater.js index 7131c392d7..a82ec7122b 100644 --- a/lib/updater.js +++ b/lib/updater.js @@ -65,7 +65,7 @@ exports.needs_upgrade = function (version) { } if (!version) return false; - return semver.lt(exports.CURRENT_VERSION, version); + return semver.lt(exports.ENGINE_VERSION, version); }; diff --git a/tools/admin/increment-version.js b/tools/admin/increment-version.js index 13267dc61b..963f8d391e 100644 --- a/tools/admin/increment-version.js +++ b/tools/admin/increment-version.js @@ -37,20 +37,20 @@ if (argv.help) { process.exit(1); } -var CURRENT_VERSION = updater.CURRENT_VERSION; +var ENGINE_VERSION = updater.ENGINE_VERSION; var files = UPDATE_FILES; if (argv.dev_bundle) { var version_path = path.join(__dirname, '..', 'meteor'); var version_data = fs.readFileSync(version_path, 'utf8'); var version_match = /BUNDLE_VERSION=([\d\.]+)/.exec(version_data); - CURRENT_VERSION = version_match[1]; + ENGINE_VERSION = version_match[1]; files = BUNDLE_FILES; } -var NEW_VERSION = argv.new_version || semver.inc(CURRENT_VERSION, 'patch'); +var NEW_VERSION = argv.new_version || semver.inc(ENGINE_VERSION, 'patch'); -console.log("Updating from " + CURRENT_VERSION + " to " + NEW_VERSION); +console.log("Updating from " + ENGINE_VERSION + " to " + NEW_VERSION); _.each(files, function (file) { var flags = ''; @@ -60,7 +60,7 @@ _.each(files, function (file) { } var fp = path.join(__dirname, '..', file); var text = fs.readFileSync(fp, 'utf8'); - var new_text = text.replace(new RegExp(CURRENT_VERSION, flags), NEW_VERSION); + var new_text = text.replace(new RegExp(ENGINE_VERSION, flags), NEW_VERSION); fs.writeFileSync(fp, new_text, 'utf8'); console.log("updated file: " + fp);