mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
A better attempt to tell users to upgrade on 'meteor run'
This commit is contained in:
committed by
David Glasser
parent
6443d7ba06
commit
db7cfbaff8
11
lib/run.js
11
lib/run.js
@@ -12,6 +12,7 @@ var updater = require(path.join(__dirname, '..', 'lib', 'updater.js'));
|
||||
var bundler = require(path.join(__dirname, '..', 'lib', 'bundler.js'));
|
||||
var mongo_runner = require(path.join(__dirname, '..', 'lib', 'mongo_runner.js'));
|
||||
var mongoExitCodes = require(path.join(__dirname, '..', 'lib', 'mongo_exit_codes.js'));
|
||||
var warehouse = require("./warehouse.js");
|
||||
|
||||
var _ = require('underscore');
|
||||
var inFiber = require(path.join(__dirname, 'fiber-helpers.js')).inFiber;
|
||||
@@ -496,7 +497,7 @@ _.extend(DependencyWatcher.prototype, {
|
||||
|
||||
// XXX this should move to main meteor command-line, probably?
|
||||
var start_update_checks = function () {
|
||||
var update_check = function () {
|
||||
var update_check = inFiber(function () { // 'inFiber' to ensure we don't delay launching the app
|
||||
var manifest;
|
||||
try {
|
||||
manifest = updater.getManifest();
|
||||
@@ -508,7 +509,7 @@ var start_update_checks = function () {
|
||||
var latestRelease = manifest.releases.stable;
|
||||
|
||||
if (!files.in_checkout() && manifest &&
|
||||
latestRelease !== releaseVersion) {
|
||||
latestRelease !== warehouse.latestRelease()) {
|
||||
console.log("////////////////////////////////////////");
|
||||
console.log("////////////////////////////////////////");
|
||||
console.log();
|
||||
@@ -517,9 +518,11 @@ var start_update_checks = function () {
|
||||
console.log();
|
||||
console.log("////////////////////////////////////////");
|
||||
console.log("////////////////////////////////////////");
|
||||
|
||||
warehouse.fetchLatestRelease();
|
||||
}
|
||||
};
|
||||
setInterval(inFiber(update_check), 12*60*60*1000); // twice a day
|
||||
});
|
||||
setInterval(update_check, 12*60*60*1000); // twice a day
|
||||
update_check(); // and now.
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user