Skip to content

Commit d814a2e

Browse files
committed
aggressive cleanup of gem artifacts not needed at run time. 300 to 400% reduction in size
1 parent 18951e6 commit d814a2e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
bundle:
33
/usr/bin/bundle install --without test --path vendor/bundle --binstubs bin/ --deployment
44
(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
5+
# clean up things that are not needed at run time
6+
(cd vendor/bundle/ruby/ && rm -rf cache) || true
7+
(cd vendor/bundle/ruby/gems && rm -rf rails-*/guides */spec */doc */doc-api) || true
8+
(cd vendor/bundle/ruby/gems && rm -rf */test */tests) || true
9+
(cd vendor/bundle/ruby/ && find . \( -name '*.[coa]' -or -name '*.cc' -or -name '*.md' -or -name '.git' \) -exec rm -rf {} \;) || true
510

611
distclean: clean
712
rm -rf vendor/bundle

0 commit comments

Comments
 (0)