Skip to content

Commit

Permalink
Add a new task to get a local shell with env vars set!
Browse files Browse the repository at this point in the history
  • Loading branch information
relistan committed Apr 17, 2015
1 parent 7aaeb67 commit e7e3b09
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/tasks/deploy.rake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ end

task :stop => ['deploy:stop']

namespace :dev do
task :export_only do
# This removes the known-to-be-problematic bundler env
# vars but doesn't try to sanitize the whole ENV. Doing
# so breaks things like rbenv which we need to use when
# testing. A /bin/bash -l will help further clean it up.
ENV.reject! { |(var, val)| var =~ /^BUNDLE_/ }
fetch(:env_vars).each { |(var, value)| ENV[var] = value }
exec fetch(:development_shell, '/bin/bash -l')
end
end

namespace :deploy do
include Centurion::Deploy

Expand Down Expand Up @@ -250,4 +262,5 @@ namespace :deploy do

invoke 'deploy'
end

end

0 comments on commit e7e3b09

Please sign in to comment.