Add option to skip release check (#7445)

* Add --no-release-check option to skip release check

* Add METEOR_NO_RELEASE_CHECK environment variable
This commit is contained in:
Yo-An Lin
2016-08-17 22:00:15 +08:00
committed by Ben Newman
parent 2290911723
commit e326fddafb
3 changed files with 6 additions and 1 deletions

View File

@@ -256,6 +256,7 @@ var runCommandOptions = {
'mobile-port': { type: String },
'app-port': { type: String },
'debug-port': { type: String },
'no-release-check': { type: Boolean },
production: { type: Boolean },
'raw-logs': { type: Boolean },
settings: { type: String },
@@ -374,6 +375,7 @@ function doRunCommand(options) {
oplogUrl: process.env.MONGO_OPLOG_URL,
mobileServerUrl: utils.formatUrl(parsedMobileServerUrl),
once: options.once,
noReleaseCheck: options['no-release-check'] || process.env.METEOR_NO_RELEASE_CHECK,
cordovaRunner: cordovaRunner
});
}

View File

@@ -58,6 +58,7 @@ Options:
--release Specify the release of Meteor to use.
--verbose Print all output from builds logs.
--no-lint Don't run linters used by the app on every rebuild.
--no-release-check Don't run the release updater to check for new releases.
--allow-incompatible-update Allow packages in your project to be upgraded or
downgraded to versions that are potentially incompatible with
the current versions, if required to satisfy all package

View File

@@ -31,6 +31,7 @@ class Runner {
rootUrl,
selenium,
seleniumBrowser,
noReleaseCheck,
...optionsForAppRunner
}) {
const self = this;
@@ -46,6 +47,7 @@ class Runner {
self.regenerateAppPort();
self.stopped = false;
self.noReleaseCheck = noReleaseCheck;
self.quiet = quiet;
self.banner = banner || files.convertToOSPath(
files.prettyPath(self.projectContext.projectDir)
@@ -125,7 +127,7 @@ class Runner {
var unblockAppRunner = self.appRunner.makeBeforeStartPromise();
self._startMongoAsync().then(unblockAppRunner);
if (! self.stopped) {
if (!self.noReleaseCheck && ! self.stopped) {
self.updater.start();
}