Sha256: f622b4124a6291872e8ff20e26b85ea19aa81a1354816df70270a4430ad097a0

Contents?: true

Size: 705 Bytes

Versions: 8

Compression:

Stored size: 705 Bytes

Contents

_cset(:config_repo, nil)

after "deploy:setup", "config:setup"
after "deploy:update_code", "config:deploy"

namespace :config do
  desc "Setup configuration repository if any"
  task :setup, :roles => :app, :except => { :no_release => true } do
    unless config_repo.nil?
      run "rm -rf #{config_path} && git clone -q #{config_repo} #{config_path}"
    end
  end

  desc "Deploy config files from shared/config to current release"
  task :deploy, :roles => :app, :except => { :no_release => true } do
    unless config_repo.nil?
      run "cd #{config_path} && git pull -q"
    end

    fetch(:config_files, []).each do |f|
      run "cp #{config_path}/#{f} #{release_path}/config/"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
capper-0.9.4 lib/capper/config.rb
capper-0.9.3 lib/capper/config.rb
capper-0.9.2 lib/capper/config.rb
capper-0.9.1 lib/capper/config.rb
capper-0.9.0 lib/capper/config.rb
capper-0.8.3 lib/capper/config.rb
capper-0.8.1 lib/capper/config.rb
capper-0.8.0 lib/capper/config.rb