Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # This file is used with a nuxt + aws cli + s3 workflow so that your artifacts get gzipped.
  4. # tested only on osx
  5.  
  6. # Create files.
  7. nuxt generate
  8. wait
  9.  
  10. # Compress dist files.
  11. gzip -r -9 dist/
  12.  
  13. # Remove .gz file extension.
  14. while IFS= read -r file; do mv $file ${file%.gz}; done < <(find dist/ -type f -name "*.gz")
  15.  
  16. # Deploy
  17. aws s3 cp dist s3://{bucket-name-here} --recursive --content-encoding gzip --cache-control public,max-age=30672000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement