check platforms before plugins

a platform change often creates a plugin change, so we should mention
the more major change first.  also helps with "meteor exits when cordova
platforms change" self-test
This commit is contained in:
David Glasser
2014-11-24 22:11:56 -08:00
parent 1ccf81fea0
commit e42e104bc2

View File

@@ -496,18 +496,6 @@ _.extend(AppRunner.prototype, {
bundleResult = bundleResultOrRunResult.bundleResult;
firstRun = false;
var plugins = cordova.getCordovaDependenciesFromStar(
bundleResult.starManifest);
if (self.cordovaPlugins && ! _.isEqual(self.cordovaPlugins, plugins)) {
return {
outcome: 'outdated-cordova-plugins'
};
}
// XXX #3006 This is racy --- we should get this from the pre-runner build,
// not from the first runner build.
self.cordovaPlugins = plugins;
var platforms = self.projectContext.platformList.getCordovaPlatforms();
platforms.sort();
if (self.cordovaPlatforms &&
@@ -520,6 +508,18 @@ _.extend(AppRunner.prototype, {
// not from the first runner build.
self.cordovaPlatforms = platforms;
var plugins = cordova.getCordovaDependenciesFromStar(
bundleResult.starManifest);
if (self.cordovaPlugins && ! _.isEqual(self.cordovaPlugins, plugins)) {
return {
outcome: 'outdated-cordova-plugins'
};
}
// XXX #3006 This is racy --- we should get this from the pre-runner build,
// not from the first runner build.
self.cordovaPlugins = plugins;
var serverWatchSet = bundleResult.serverWatchSet;
// Read the settings file, if any