Sha256: 03622bdc9e2dc6f326571becd2f16bd66563f2405cbc65181c25a507e6acf323

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

require "cap-chown/version"

Capistrano::Configuration.instance(:must_exist).load do
  namespace :deploy do
    desc "Chown all files in release to application account"
    
    task :chown do
      old_sudo = sudo
      set :sudo, "sudo"
      if defined?(:app_user) && defined?(:app_group)
        run "#{sudo} chown -R #{app_user}:#{app_group} #{releases_path}"
      else
        run "#{sudo} chown -R --reference=#{deploy_to} #{releases_path}"
      end
      set :sudo, old_sudo
    end
  end
  after 'deploy:cleanup', 'deploy:chown'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cap-chown-0.0.4 lib/cap-chown.rb