refactoring

This commit is contained in:
Yuri Kuznetsov
2021-06-23 10:27:04 +03:00
parent bf4a01971d
commit 9f00055454
2 changed files with 46 additions and 46 deletions
+11 -17
View File
@@ -75,28 +75,22 @@ if (process.argv.length > 1) {
let espoPath = path.dirname(fs.realpathSync(__filename));
let diff = new Diff(espoPath, {
isAll: isAll,
isDev: isDev,
withVendor: withVendor,
forceScripts: forceScripts,
acceptedVersionName: !isAll ? acceptedVersionName : null,
});
if (isAll) {
let diff = new Diff(espoPath, {
isDev: isDev,
withVendor: withVendor,
forceScripts: forceScripts,
});
let versionFromList = diff.getPreviousVersionList();
diff.buildMultipleUpgradePackages(versionFromList);
diff.buildAllUpgradePackages();
}
else {
if (!isAll) {
if (!versionFrom) {
throw new Error("No 'version' specified.");
}
let diff = new Diff(espoPath, {
acceptedVersionName: acceptedVersionName,
isDev: isDev,
withVendor: withVendor,
forceScripts: forceScripts,
});
diff.buildUpgradePackage(versionFrom);
}