Permalink
Browse files

Push config.yml during setup, symlink it into current on update.

  • Loading branch information...
1 parent 9ac179e commit bf8f94fbeb99696e267867b54fbd0b187f16f181 @gma committed Jan 12, 2009
Showing with 15 additions and 5 deletions.
  1. +15 −5 config/deploy.rb.sample
@@ -6,7 +6,7 @@ set :repository, "git://github.com/gma/nesta.git"
# (see below).
#
#set :user, "deploy"
-#set :domain, "#{user}@example.com"
+#set :domain, "#{deploy}@example.com"
set :domain, "example.com"
set :deploy_to, "/var/apps/#{application}"
@@ -16,11 +16,21 @@ require "tempfile"
require "vlad"
namespace :vlad do
- remote_task :config do
- put "#{shared_path}/config/config.yml", "vlad.config.yml" do
+ remote_task :config_yml do
+ put "#{shared_path}/config.yml", "vlad.config.yml" do
File.open(File.join(File.dirname(__FILE__), "config.yml")).read
end
end
+
+ task :setup do
+ Rake::Task['vlad:config_yml'].invoke
+ end
+
+ remote_task :symlink_config_yml do
+ run "ln -s #{shared_path}/config.yml #{current_path}/config/config.yml"
+ end
+
+ task :update do
+ Rake::Task['vlad:symlink_config_yml'].invoke
+ end
end
-
-

0 comments on commit bf8f94f

Please sign in to comment.