hi,
i’m just getting started using switchtower for deployment. i’m working
with a small team of 3 and a hosted subversion repository.
i have switchtower working, but i need to create two custom tasks and
have those tasks run at deployment. 1) copy a working dispatch.fcgi
from another folder, and 2) copy db/database.example to
db/database.yml
here is what i’ve tried, inside of deploy.rb:
custom tasks
desc “copy another dispatch.fcgi, which gets deleted”
task :cp_dispatch_fcgi do
File.copy(“/path/to/other_app/public_html/dispatch.fcgi”,
“/path/to/current/public/dispatch.fcgi”)
end
desc “copy database.example to database.yaml”
task :cp_database_yaml do
put(File.read(‘/path/to/current/db/database.example’),
“/path/to/current/db/database.yml”, :mode => 0444)
end
and then:
desc “deploy”
task :deploy do
transaction do
update_code
update_current
cp_dispatch_fcgi
cp_database_yaml
end
end
i may be going about this all wrong, so any help would be appreciated.
thanks in advance, ian
–
Ian Kennedy
http://www.fiftymillimeter.com