Fix eslint errors
This commit is contained in:
parent
80089404ac
commit
97ed1db18e
|
@ -129,7 +129,7 @@ function acquire(desired, target) {
|
||||||
function getSyncCommitSha(version) {
|
function getSyncCommitSha(version) {
|
||||||
return exec(`git ls-remote git@github.com:realm/realm-sync.git --tags "v${version}^{}"`)
|
return exec(`git ls-remote git@github.com:realm/realm-sync.git --tags "v${version}^{}"`)
|
||||||
.then(stdout => {
|
.then(stdout => {
|
||||||
if (!Boolean(stdout)) {
|
if (!stdout) {
|
||||||
return exec(`git ls-remote git@github.com:realm/realm-sync.git --tags "v${version}"`)
|
return exec(`git ls-remote git@github.com:realm/realm-sync.git --tags "v${version}"`)
|
||||||
} else {
|
} else {
|
||||||
return stdout;
|
return stdout;
|
||||||
|
@ -151,12 +151,13 @@ function getCoreRequirements(dependencies, options, required = {}) {
|
||||||
required.CORE_SERVER_FOLDER += `/ios/${flavor}`;
|
required.CORE_SERVER_FOLDER += `/ios/${flavor}`;
|
||||||
required.CORE_ARCHIVE = `realm-core-${flavor}-v${dependencies.REALM_CORE_VERSION}-iphoneos.tar.gz`;
|
required.CORE_ARCHIVE = `realm-core-${flavor}-v${dependencies.REALM_CORE_VERSION}-iphoneos.tar.gz`;
|
||||||
return Promise.resolve(required);
|
return Promise.resolve(required);
|
||||||
case 'win':
|
case 'win': {
|
||||||
if (!options.arch) throw new Error(`Specifying '--arch' is required for platform 'win'`);
|
if (!options.arch) throw new Error(`Specifying '--arch' is required for platform 'win'`);
|
||||||
const arch = options.arch === 'ia32' ? 'Win32' : options.arch;
|
const arch = options.arch === 'ia32' ? 'Win32' : options.arch;
|
||||||
required.CORE_SERVER_FOLDER += `/windows/${arch}/nouwp/${flavor}`;
|
required.CORE_SERVER_FOLDER += `/windows/${arch}/nouwp/${flavor}`;
|
||||||
required.CORE_ARCHIVE = `realm-core-${flavor}-v${dependencies.REALM_CORE_VERSION}-Windows-${arch}-devel.tar.gz`;
|
required.CORE_ARCHIVE = `realm-core-${flavor}-v${dependencies.REALM_CORE_VERSION}-Windows-${arch}-devel.tar.gz`;
|
||||||
return Promise.resolve(required);
|
return Promise.resolve(required);
|
||||||
|
}
|
||||||
case 'linux':
|
case 'linux':
|
||||||
required.CORE_SERVER_FOLDER = 'core';
|
required.CORE_SERVER_FOLDER = 'core';
|
||||||
required.CORE_ARCHIVE = `realm-core-${dependencies.REALM_CORE_VERSION}.tgz`;
|
required.CORE_ARCHIVE = `realm-core-${dependencies.REALM_CORE_VERSION}.tgz`;
|
||||||
|
@ -180,7 +181,7 @@ function getSyncRequirements(dependencies, options, required = {}) {
|
||||||
required.SYNC_ARCHIVE = `realm-sync-cocoa-${dependencies.REALM_SYNC_VERSION}.tar.xz`;
|
required.SYNC_ARCHIVE = `realm-sync-cocoa-${dependencies.REALM_SYNC_VERSION}.tar.xz`;
|
||||||
required.SYNC_ARCHIVE_ROOT = `core`;
|
required.SYNC_ARCHIVE_ROOT = `core`;
|
||||||
return Promise.resolve(required);
|
return Promise.resolve(required);
|
||||||
case 'win':
|
case 'win': {
|
||||||
const arch = options.arch === 'ia32' ? 'Win32' : options.arch;
|
const arch = options.arch === 'ia32' ? 'Win32' : options.arch;
|
||||||
required.SYNC_ARCHIVE = `realm-sync-${flavor}-v${dependencies.REALM_SYNC_VERSION}-Windows-${arch}-devel.tar.gz`;
|
required.SYNC_ARCHIVE = `realm-sync-${flavor}-v${dependencies.REALM_SYNC_VERSION}-Windows-${arch}-devel.tar.gz`;
|
||||||
return getCoreRequirements(dependencies, options, required)
|
return getCoreRequirements(dependencies, options, required)
|
||||||
|
@ -189,6 +190,7 @@ function getSyncRequirements(dependencies, options, required = {}) {
|
||||||
required.SYNC_SERVER_FOLDER += `/sha-version/${sha}`;
|
required.SYNC_SERVER_FOLDER += `/sha-version/${sha}`;
|
||||||
return required;
|
return required;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return Promise.reject(new Error(`Unsupported sync platform '${options.platform}'`));
|
return Promise.reject(new Error(`Unsupported sync platform '${options.platform}'`));
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,7 +403,7 @@ module.exports = {
|
||||||
path: realm,
|
path: realm,
|
||||||
sync: {
|
sync: {
|
||||||
user,
|
user,
|
||||||
error : err => cosole.log(err),
|
error : err => console.log(err),
|
||||||
url: 'realm://localhost:9080/~/sync-v1'
|
url: 'realm://localhost:9080/~/sync-v1'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -449,7 +449,7 @@ module.exports = {
|
||||||
path: realm,
|
path: realm,
|
||||||
sync: {
|
sync: {
|
||||||
user,
|
user,
|
||||||
error : err => cosole.log(err),
|
error : err => console.log(err),
|
||||||
url: 'realm://localhost:9080/~/sync-v1'
|
url: 'realm://localhost:9080/~/sync-v1'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -489,7 +489,7 @@ module.exports = {
|
||||||
path: realm,
|
path: realm,
|
||||||
sync: {
|
sync: {
|
||||||
user,
|
user,
|
||||||
error : err => cosole.log(err),
|
error : err => console.log(err),
|
||||||
url: 'realm://localhost:9080/~/sync-v1'
|
url: 'realm://localhost:9080/~/sync-v1'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue