Skip to content

Commit

Permalink
aggressive cleanup of gem artifacts not needed at run time. 300 to 40…
Browse files Browse the repository at this point in the history
…0% reduction in size
  • Loading branch information
cpg committed Jun 26, 2014
1 parent 18951e6 commit d814a2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
bundle:
/usr/bin/bundle install --without test --path vendor/bundle --binstubs bin/ --deployment
(cd vendor/bundle/ruby/ && find . -type f -exec grep -l '/usr/bin/ruby' {} \; | xargs sed -i -e 's|/usr/bin/ruby|/usr/bin/ruby|') || true
# clean up things that are not needed at run time
(cd vendor/bundle/ruby/ && rm -rf cache) || true
(cd vendor/bundle/ruby/gems && rm -rf rails-*/guides */spec */doc */doc-api) || true
(cd vendor/bundle/ruby/gems && rm -rf */test */tests) || true
(cd vendor/bundle/ruby/ && find . \( -name '*.[coa]' -or -name '*.cc' -or -name '*.md' -or -name '.git' \) -exec rm -rf {} \;) || true

distclean: clean
rm -rf vendor/bundle
Expand Down

0 comments on commit d814a2e

Please sign in to comment.