Stop throwing up warnings during testing

Yeah, I test with different repos and branches. Big deal. Shut up.
This commit is contained in:
Raul Marin 2019-09-12 13:28:33 +02:00 committed by Raul Marin
parent eb71601cd6
commit f9b6e92745

View File

@ -79,22 +79,22 @@ function getAndValidateVersions(options) {
windshaft_cartodb: packageDefinition.version
};
var dependenciesToValidate = ['camshaft', 'turbo-carto', 'windshaft'];
dependenciesToValidate.forEach(function(depName) {
var declaredDependencyVersion = declaredDependencies[depName];
var installedDependencyVersion = installedDependenciesVersions[depName];
if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) {
warn(
'Dependency="%s" installed version="%s" does not match declared version="%s". Check your installation.',
depName, installedDependencyVersion, declaredDependencyVersion
);
}
});
if (process.env.NODE_ENV !== 'test') {
var dependenciesToValidate = ['camshaft', 'turbo-carto', 'windshaft'];
dependenciesToValidate.forEach(function(depName) {
var declaredDependencyVersion = declaredDependencies[depName];
var installedDependencyVersion = installedDependenciesVersions[depName];
if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) {
warn(`Dependency="${depName}" installed version="${installedDependencyVersion}" does ` +
`not match declared version="${declaredDependencyVersion}". Check your installation.`);
}
});
// Be nice and warn if configured mapnik version is != installed mapnik version
if (windshaft.mapnik.versions.mapnik !== options.grainstore.mapnik_version) {
warn('WARNING: detected mapnik version (' + windshaft.mapnik.versions.mapnik + ')' +
' != configured mapnik version (' + options.grainstore.mapnik_version + ')');
// Be nice and warn if configured mapnik version is != installed mapnik version
if (windshaft.mapnik.versions.mapnik !== options.grainstore.mapnik_version) {
warn('WARNING: detected mapnik version (' + windshaft.mapnik.versions.mapnik + ')' +
' != configured mapnik version (' + options.grainstore.mapnik_version + ')');
}
}
return installedDependenciesVersions;