Sha256: 7e41be8292d7bce3116540b99ac5988775442410074e01996f55a94b2377f714

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

namespace :deploy do
  task :setup_config do
    on roles(:app) do
      # make the config dir
      execute :mkdir, "-p #{shared_path}/config"
      full_app_name = fetch(:full_app_name)

      # config files to be uploaded to shared/config, see the
      # definition of smart_template for details of operation.
      # Essentially looks for #{filename}.erb in deploy/#{full_app_name}/
      # and if it isn't there, falls back to deploy/#{shared}. Generally
      # everything should be in deploy/shared with params which differ
      # set in the stage files
      config_files = fetch(:config_files)
      config_files.each do |file|
        smart_template file
      end

      # which of the above files should be marked as executable
      executable_files = fetch(:executable_config_files)
      executable_files.each do |file|
        execute :chmod, "+x #{shared_path}/config/#{file}"
      end

      # symlink stuff which should be... symlinked
      symlinks = fetch(:symlinks)

      symlinks.each do |symlink|
        sudo "ln -nfs #{shared_path}/config/#{symlink[:source]} #{sub_strings(symlink[:link])}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
meataxe-0.5.0 lib/meataxe/capistrano/tasks/setup_config.cap
teleporter-0.0.15 lib/generators/initial/templates/capistrano/tasks/setup_config.rake
teleporter-0.0.14 lib/generators/initial/templates/capistrano/tasks/setup_config.cap
teleporter-0.0.13 lib/generators/initial/templates/capistrano/tasks/setup_config.cap
teleporter-0.0.12 lib/generators/initial/templates/capistrano/tasks/setup_config.cap
teleporter-0.0.11 lib/generators/initial/templates/capistrano/tasks/setup_config.cap