fix: upgrade scripts

v1.18.x
Barış Soner Uşaklı 5 years ago
parent b842057f26
commit bd026cb1ae

@ -27,12 +27,9 @@ Upgrade.getAll = function (callback) {
// Sort the upgrade scripts based on version
var versionA;
var versionB;
setImmediate(next, null, files.filter(function (file) {
return path.basename(file) !== 'TEMPLATE';
}).sort(function (a, b) {
versionA = path.dirname(a).split('/').pop();
versionB = path.dirname(b).split('/').pop();
setImmediate(next, null, files.filter(file => path.basename(file) !== 'TEMPLATE').sort(function (a, b) {
versionA = path.dirname(a).split(path.sep).pop();
versionB = path.dirname(b).split(path.sep).pop();
var semverCompare = semver.compare(versionA, versionB);
if (semverCompare) {
return semverCompare;

Loading…
Cancel
Save