From c32fd7423fd84b948034102f5ff7b59505976188 Mon Sep 17 00:00:00 2001 From: Jelle Siderius Date: Mon, 19 Jul 2021 01:16:38 +0200 Subject: [PATCH] 0.2.7 --- dist/controllers/selfUpdateController.js | 1 + dist/controllers/selfUpdateController.js.map | 2 +- src/controllers/selfUpdateController.ts | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/controllers/selfUpdateController.js b/dist/controllers/selfUpdateController.js index 0bceda2..d7fc51f 100644 --- a/dist/controllers/selfUpdateController.js +++ b/dist/controllers/selfUpdateController.js @@ -22,6 +22,7 @@ class SelfUpdateController { config.npmPath = path; }); if (config.currentVersion < config.latestVersion) { + yield console_1.consoleCommand(`cd ${config.npmPath}; rm -rf dist`); yield download_git_repo_1.default('jellesiderius/mage-db-sync#master', config.npmPath, function (err) { return tslib_1.__awaiter(this, void 0, void 0, function* () { yield console_1.consoleCommand(`cd ${config.npmPath}; npm install`); diff --git a/dist/controllers/selfUpdateController.js.map b/dist/controllers/selfUpdateController.js.map index ae41623..6a48474 100644 --- a/dist/controllers/selfUpdateController.js.map +++ b/dist/controllers/selfUpdateController.js.map @@ -1 +1 @@ -{"version":3,"file":"selfUpdateController.js","sourceRoot":"","sources":["../../src/controllers/selfUpdateController.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,kFAAwC;AACxC,aAAa;AACb,2DAAmD;AACnD,8CAAyD;AAGzD,iFAAiD;AAEjD,MAAM,oBAAoB;IAA1B;QACY,iBAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;QAE1C,iBAAY,GAAG,CAAO,WAA+B,EAAoB,EAAE;YACvE,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;YAE1C,IAAI,IAAI,GAAG,IAAI,CAAC;YAChB,IAAI,MAAM,GAAG;gBACT,SAAS,EAAE,EAAE;gBACb,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc;gBACzD,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa;aAC1D,CAAC;YAEF,MAAM,qCAAgB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE;gBACzD,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YAC1B,CAAC,CAAC,CAAC;YAEH,IAAI,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;gBAC9C,MAAM,2BAAQ,CAAC,mCAAmC,EAAE,MAAM,CAAC,OAAO,EAAE,UAAgB,GAAQ;;wBACxF,MAAM,wBAAc,CAAC,MAAM,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;wBAC1D,iBAAO,CAAC,6BAA6B,MAAM,CAAC,cAAc,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;oBAC7F,CAAC;iBAAA,CAAC,CAAC;aACN;iBAAM;gBACH,iBAAO,CAAC,oCAAoC,CAAC,CAAC;aACjD;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAA"} \ No newline at end of file +{"version":3,"file":"selfUpdateController.js","sourceRoot":"","sources":["../../src/controllers/selfUpdateController.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,kFAAwC;AACxC,aAAa;AACb,2DAAmD;AACnD,8CAAyD;AAGzD,iFAAiD;AAEjD,MAAM,oBAAoB;IAA1B;QACY,iBAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;QAE1C,iBAAY,GAAG,CAAO,WAA+B,EAAoB,EAAE;YACvE,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;YAE1C,IAAI,IAAI,GAAG,IAAI,CAAC;YAChB,IAAI,MAAM,GAAG;gBACT,SAAS,EAAE,EAAE;gBACb,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc;gBACzD,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa;aAC1D,CAAC;YAEF,MAAM,qCAAgB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE;gBACzD,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YAC1B,CAAC,CAAC,CAAC;YAEH,IAAI,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;gBAC9C,MAAM,wBAAc,CAAC,MAAM,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;gBAE1D,MAAM,2BAAQ,CAAC,mCAAmC,EAAE,MAAM,CAAC,OAAO,EAAE,UAAgB,GAAQ;;wBACxF,MAAM,wBAAc,CAAC,MAAM,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;wBAC1D,iBAAO,CAAC,6BAA6B,MAAM,CAAC,cAAc,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;oBAC7F,CAAC;iBAAA,CAAC,CAAC;aACN;iBAAM;gBACH,iBAAO,CAAC,oCAAoC,CAAC,CAAC;aACjD;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAA"} \ No newline at end of file diff --git a/src/controllers/selfUpdateController.ts b/src/controllers/selfUpdateController.ts index c795247..658a83e 100644 --- a/src/controllers/selfUpdateController.ts +++ b/src/controllers/selfUpdateController.ts @@ -25,6 +25,8 @@ class SelfUpdateController { }); if (config.currentVersion < config.latestVersion) { + await consoleCommand(`cd ${config.npmPath}; rm -rf dist`); + await download('jellesiderius/mage-db-sync#master', config.npmPath, async function (err: any) { await consoleCommand(`cd ${config.npmPath}; npm install`); success(`Updated mage-db-sync from ${config.currentVersion} to ${config.latestVersion}`);