Closed AliOsseili closed 6 years ago
This is the same issue as https://github.com/twolfson/grunt-zip/issues/48
The issue is we built cwd
in a counter-intuitive manner where it must be re-specified in src
as well. It mostly acts as a router for inside the bundle itself. The following should work:
'zip': {
'long-format': {
cwd:'./build/enhancedFeedLeft'+'-'+os_platform+'-'+arch_model+'/',
src: ['./build/enhancedFeedLeft'+'-'+os_platform+'-'+arch_model+'/*/**'],
dest: 'BuildZip/enhancedFeedLeft'+'-'+os_platform+'-'+arch_model+'-'+TimeNow+'.zip'
}
}
ah thanks I was just reading that issue rn and felt like a big doof lol
When I tried this leaving the original zip inside, It changed to 1.5 GB now, any ideas why?
I don't think I follow your last question
So I tried running the task again, with leaving the right sized zip folder of 378 MB where it is, and the output of running the zip task gave me a 1.5gb zip
Hmm, I'm not sure. Try removing the .zip
file and re-running the task?
We also support --verbose
to debug what files are being written to the .zip
:
grunt --verbose zip
When I zip my build, it works out fine the first time, everything is all good. But when I zip the second time the size appears to get bigger (goes from a 378 mb zip to an 1.08 gb zip) My theory is it zips the zip folder again adding to the size but when I open the 1.08 GB zip, the 378mb zip doesn't exist...
here is what the task looks like: 'zip': { 'long-format': { cwd:'./build/enhancedFeedLeft'+'-'+os_platform+'-'+arch_model+'/', src: ['*/**'], dest: 'BuildZip/enhancedFeedLeft'+'-'+os_platform+'-'+arch_model+'-'+TimeNow+'.zip' } } this works fine but if I do it twice without deleting the original zip, its gets bigger