Created
January 6, 2011 15:36
-
-
Save nevans/768022 to your computer and use it in GitHub Desktop.
how to use private git repos with bundler at Engine Yard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this into your config/eydeploy.rb | |
def bundle | |
if File.exist?("#{c.release_path}/Gemfile") | |
info "~> Gemfile detected, bundling gems" | |
lockfile = File.join(c.release_path, "Gemfile.lock") | |
bundler_installer = if File.exist?(lockfile) | |
get_bundler_installer(lockfile) | |
else | |
warn_about_missing_lockfile | |
bundler_09_installer(default_09_bundler) | |
end | |
sudo "#{$0} _#{EY::Serverside::VERSION}_ install_bundler #{bundler_installer.version}" | |
#################################################### | |
# this is the only line that has been changed: | |
#run "cd #{c.release_path} && bundle _#{bundler_installer.version}_ install #{bundler_installer.options}" | |
run "exec ssh-agent bash -c 'ssh-add /home/deploy/.ssh/#{c.app}-deploy-key && cd #{c.release_path} && bundle _#{bundler_installer.version}_ install #{bundler_installer.options}'" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment