+6
-1
@@ -514,7 +514,12 @@ function update(boxUpdateInfo, callback) {
|
|||||||
progress.set(progress.UPDATE, 0, 'Starting');
|
progress.set(progress.UPDATE, 0, 'Starting');
|
||||||
|
|
||||||
// initiate the update/upgrade but do not wait for it
|
// initiate the update/upgrade but do not wait for it
|
||||||
if (boxUpdateInfo.upgrade) {
|
if (config.version().match(/[-+]/) !== null && (config.version() === boxUpdateInfo.version.replace(/[-+].*/, ''))) {
|
||||||
|
debug('Starting short-circuit from prerelease version %s to release version %s', config.version(), boxUpdateInfo.version);
|
||||||
|
config.setVersion(boxUpdateInfo.version);
|
||||||
|
progress.set(progress.UPDATE, 100, '');
|
||||||
|
locker.unlock(locker.OP_BOX_UPDATE);
|
||||||
|
} else if (boxUpdateInfo.upgrade) {
|
||||||
debug('Starting upgrade');
|
debug('Starting upgrade');
|
||||||
doUpgrade(boxUpdateInfo, function (error) {
|
doUpgrade(boxUpdateInfo, function (error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ exports = module.exports = {
|
|||||||
fqdn: fqdn,
|
fqdn: fqdn,
|
||||||
token: token,
|
token: token,
|
||||||
version: version,
|
version: version,
|
||||||
|
setVersion: setVersion,
|
||||||
isCustomDomain: isCustomDomain,
|
isCustomDomain: isCustomDomain,
|
||||||
database: database,
|
database: database,
|
||||||
|
|
||||||
@@ -179,6 +180,10 @@ function version() {
|
|||||||
return get('version');
|
return get('version');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setVersion(version) {
|
||||||
|
set('version', version);
|
||||||
|
}
|
||||||
|
|
||||||
function isCustomDomain() {
|
function isCustomDomain() {
|
||||||
return get('isCustomDomain');
|
return get('isCustomDomain');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user