Do not automatically update apps with a major version change

(future) pre-1.0 packages can be considered 'experimental'

Fixes #342
This commit is contained in:
Girish Ramakrishnan
2017-07-27 13:35:07 -07:00
parent 204340eac0
commit 4f9a9906c9
2 changed files with 5 additions and 1 deletions

View File

@@ -1001,6 +1001,8 @@ function updateApps(updateInfo, auditSource, callback) { // updateInfo is { appI
assert.strictEqual(typeof callback, 'function');
function canAutoupdateApp(app, newManifest) {
if ((semver.major(app.manifest.version) !== 0) && (semver.major(app.manifest.version) !== semver.major(newManifest.version))) return false; // major changes are blocking
var newTcpPorts = newManifest.tcpPorts || { };
var oldTcpPorts = app.manifest.tcpPorts || { };
var portBindings = app.portBindings; // this is never null