Skip to content

Instantly share code, notes, and snippets.

@fabn
Created May 9, 2011 17:59
Show Gist options
  • Save fabn/962992 to your computer and use it in GitHub Desktop.
Save fabn/962992 to your computer and use it in GitHub Desktop.
Custom task for capistrano
set :application, "set your application name here"
set :repository, "set your repository location here"
set :deploy_to, "set path where to deploy application"
set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "your web-server here" # Your HTTP server, Apache/etc
namespace :deploy
desc "Update wurfl data"
task :update_wurfl, :except => { :no_release => true } do
# this will run commands on remote server
logger.info "Copying new wurfl data into shared path"
run "cp -a #{release_path}/data/wurfl #{shared_path}/data/"
end
end
# normal workflow is (indentation outlines subtasks)
# - update_code
# - strategy.deploy
# - finalize_update
# # these aren't subtasks, but parts of finalize_update
# - here data will be symlinked
# - here zf is symlinked
# - symlink # update the current symoblic link
# your task insertion point
before 'deploy:finalize_update', 'deploy:update_wurfl'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment