diff options
| author | Kasra Bigdeli <[email protected]> | 2020-08-16 19:40:55 -0400 |
|---|---|---|
| committer | Kasra Bigdeli <[email protected]> | 2020-08-16 19:40:55 -0400 |
| commit | 83103a180914dff274188594132c1395f12a1645 (patch) | |
| tree | 7aa940008857256403702753b464fccf57096d8f /scripts/build_one_click_apps.js | |
| parent | 723ca5cca53bf5a569cb951b77f7a9b71fe088bd (diff) | |
| download | caprover-one-click-apps-83103a180914dff274188594132c1395f12a1645.tar.gz caprover-one-click-apps-83103a180914dff274188594132c1395f12a1645.zip | |
Fixed build
Diffstat (limited to 'scripts/build_one_click_apps.js')
| -rw-r--r-- | scripts/build_one_click_apps.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/scripts/build_one_click_apps.js b/scripts/build_one_click_apps.js index 10bed59..1a3d816 100644 --- a/scripts/build_one_click_apps.js +++ b/scripts/build_one_click_apps.js @@ -114,24 +114,9 @@ function convertV2toV4(v2String) { function buildDist() { - return Promise.resolve() - .then(function () { - return fs.existsSync(pathOfSourceDirectoryApps) - }) - .then(function (dirExists) { - - if (!dirExists) { - return []; - } - - return fs.readdir(pathOfSourceDirectoryApps); - }) + return fs.readdir(pathOfSourceDirectoryApps) .then(function (appsFileNames) { // [ app1.json app2.json .... ] - if (appsFileNames.length === 0) { - return; - } - appsFileNames.forEach(appFileName => { const pathOfAppFileInSource = path.join(pathOfSourceDirectoryApps, appFileName); @@ -158,7 +143,8 @@ function buildDist() { fs.outputJsonSync(path.join(pathOfDistV2, 'list'), v3List); // TODO delete oneClickApps: fs.outputJsonSync(path.join(pathOfDistV3, 'list'), v3List); fs.outputJsonSync(path.join(pathOfDistV4, 'list'), v3List); - + }) + .then(function () { return fs.copySync(path.join(pathOfPublic, 'CNAME'), path.join(pathOfDist, 'CNAME')); }); } |
