Add support for advzip
Allow recompressing archives before upload for fastest possible download speeds.master
parent
55dde646fb
commit
587aa81e79
|
@ -54,6 +54,21 @@ module.exports = async gitexport => {
|
|||
});
|
||||
zipstr.end();
|
||||
zipstr.close();
|
||||
|
||||
if(config.advzip) {
|
||||
let modeopts = [-4];
|
||||
if(typeof config.advzip === 'number') {
|
||||
if(config.advzip <= 4)
|
||||
modeopts = ['-' + Math.floor(config.advzip)];
|
||||
else
|
||||
modeopts.push('-i', Math.floor(config.advzip));
|
||||
}
|
||||
const adv = spawn('advzip', ['-z', ...modeopts, zipfile], {
|
||||
stdio: ['ignore', 'inherit', 'inherit']
|
||||
});
|
||||
await adv.promise;
|
||||
}
|
||||
|
||||
const params = {
|
||||
title: config.version,
|
||||
commit: commit,
|
||||
|
|
Loading…
Reference in New Issue