DEV Community

[Comment from a deleted post]
Collapse
 
ibrahimcesar profile image
Info Comment hidden by post author - thread only visible in this permalink
Ibrahim Cesar • Edited

For everyone that uses the command line or needs create zips via bash in a deployment type of workflow, this achieve the same onde you are inside the directory you want to zip:

> zip -r <dir>.zip . -x ".*" -x "__MACOSX"
Enter fullscreen mode Exit fullscreen mode

Where <dir> is the name you want. You can also check with:

> zipinfo <dir>.zip
Enter fullscreen mode Exit fullscreen mode

Please, also note the rule ".*" exclude any file starting with an ., if you need some kind of hidden file you change it to just " .DS_Store" or whatever pattern suits you.