Skip to content

Instantly share code, notes, and snippets.

@technoweenie
Created October 28, 2008 18:42
Show Gist options
  • Save technoweenie/20467 to your computer and use it in GitHub Desktop.
Save technoweenie/20467 to your computer and use it in GitHub Desktop.
task :write_memcache_config, :roles => :app, :except => {:no_release => true, :no_symlink => true} do
get("#{shared_path}/config/memcached.yml.tmpl", 'memcached.yml.tmpl')
template = IO.read "memcached.yml.tmpl"
File.unlink "memcached.yml.tmpl"
put template.sub(/%NAMESPACE%/, "lh#{File.basename latest_release}"), "#{release_path}/config/memcached.yml", :mode => 0644
end
task :lh_custom, :roles => :app, :except => {:no_release => true, :no_symlink => true} do
write_memcache_config
# other custom crap
end
after "deploy:symlink_configs", "lh_custom"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment