I'm trying to figure out how to pack a zip fille from a folder with a version suffix, but keep the original name of the folder when the archive is being extracted. It's a wp theme. So theme-1.5.0.zip
must extract a folder named theme
. But this code extracts it like theme-1.5.0
gulp.task('make-zip', function () {
return gulp.src('build/theme/**')
.pipe(zip('theme-'+version+'.zip'))
.pipe(gulp.dest('build'))
});
When I compress theme
folder manually in finder and then rename theme.zip
to theme-1.5.0.zip
it actually keeps the original name inside. But not if it was compressed with gulp.
Thanks!