diff --git a/zip.js b/zip.js index ceb303d..8a0fa16 100644 --- a/zip.js +++ b/zip.js @@ -6,7 +6,7 @@ const cwd = 'dist/' const folderPath = '**'; const out = 'cloudspout-button-panel.zip'; -glob(folderPath, {cwd, nodir:true}, (err, files) => { +glob(folderPath, {cwd}, (err, files) => { if (err) { console.error(err); @@ -17,6 +17,8 @@ glob(folderPath, {cwd, nodir:true}, (err, files) => { const archive = archiver('zip', {zlib:{level: 9}}); archive.pipe(output); + // Linux needs the root folder itself + archive.file(cwd, {name:'cloudspout-button-panel/'}) files.forEach(file => { if (file === out) return; console.log(file); @@ -26,5 +28,3 @@ glob(folderPath, {cwd, nodir:true}, (err, files) => { archive.finalize(); }); - -