Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 48 lines (40 sloc) 1.411 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# Required gems/libraries
require 'rubygems'
require 'railsless-deploy'
require 'capistrano/ext/multistage'
require 'ash/common'

configuration = Capistrano::Configuration.respond_to?(:instance) ?
  Capistrano::Configuration.instance(:must_exist) :
  Capistrano.configuration(:must_exist)
  
configuration.load do

# --------------------------------------------
# Setting defaults
# --------------------------------------------
_cset :copy_exclude, [".svn", ".DS_Store", "*.sample", "LICENSE*", "Capfile", "config"]
_cset :deploy_via, :remote_cache
_cset :group_writable, false
_cset :use_sudo, false

# --------------------------------------------
# Calling our Methods
# --------------------------------------------
after "deploy:finalize_update", "ash:fixperms"

# --------------------------------------------
# Ash methods
# --------------------------------------------
namespace :ash do
    desc "Fix the permissions on Ash servers"
    task :fixperms, :except => { :no_release => true } do
        # chmod the files and directories.
        run "find #{latest_release} -type d -exec chmod 755 {} \\;"
        run "find #{latest_release} -type f -exec chmod 644 {} \\;"
    end
    
    desc "Task for to test that Capistrano is working"
    task :uname do
        run "uname -a"
    end

    desc "Print environment of Capistrano user"
    task :getpath do
        run "echo $PATH"
    end
end

end
Something went wrong with that request. Please try again.