From deeb5097e38c83fccbf3d5d9488731458d362352 Mon Sep 17 00:00:00 2001 From: William Johnston Date: Mon, 19 Sep 2016 08:09:05 -0500 Subject: [PATCH] Add docs per clean option. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4b13212f..c3db26e7 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,13 @@ $ bundle install \ If any option is set to `nil` it will be excluded from the final bundle command. +If you want to clean up gems after a successful deploy, add `after 'deploy:published', 'bundler:clean'` to config/deploy.rb. + +Downsides to cleaning: + +* If a rollback requires rebuilding a Gem with a large compiled binary component, such as Nokogiri, the rollback will take a while. +* In rare cases, if a gem that was used in the previously deployed version was yanked, rollback would entirely fail. + ### Environment Variables The `bundle_env_variables` option can be used to specify any environment variables you want present when running the `bundle` command: