CURRENT_VERSION -> ENGINE_VERSION

This commit is contained in:
Avital Oliver
2013-02-07 16:33:20 -08:00
committed by David Glasser
parent 2ee683ec68
commit cb64708cae
4 changed files with 10 additions and 9 deletions

View File

@@ -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)");

View File

@@ -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;

View File

@@ -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);
};

View File

@@ -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);