Skip to content

Instantly share code, notes, and snippets.

@diogoko
Last active July 21, 2021 12:34
Show Gist options
  • Save diogoko/e52e1a38bc09b8f8c7d9c712a685a4b2 to your computer and use it in GitHub Desktop.
Save diogoko/e52e1a38bc09b8f8c7d9c712a685a4b2 to your computer and use it in GitHub Desktop.
Comprime um projeto Laravel para envio
#!/bin/bash -eu
NOME=$(basename $PWD)-$(date '+%Y%m%d.%H%M').zip
zip -r \
-q \
-9 \
$NOME \
. \
-x '.git/*' \
-x '*.zip' \
-x 'bootstrap/cache/**' \
-x 'node_modules/*' \
-x 'storage/app/**' \
-x 'storage/debugbar/**' \
-x 'storage/framework/cache/**' \
-x 'storage/framework/sessions/**' \
-x 'storage/framework/testing/**' \
-x 'storage/framework/views/**' \
-x 'storage/logs/**' \
-x 'vendor/*'
echo "Projeto arquivado como $NOME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment