Sha256: e9222603243662209287c52e24c2aa27c2bb4ef35b50561a4be56a0b34b29071

Contents?: true

Size: 461 Bytes

Versions: 13

Compression:

Stored size: 461 Bytes

Contents

Capistrano::Configuration.instance.load do
  require_settings :current_path, :repository, :branch

  before "setup", "code:setup"
  before "deploy:update_code", "code:update"

  namespace :code do
    desc "Clone the repository"
    task :setup do
      run "git clone #{repository} #{current_path}"
    end

    desc "Update the repository"
    task :update do
      run "cd #{current_path} && git fetch origin && git reset --hard #{branch}"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
capistrano-elobuff-0.2.7 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.6 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.5 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.4 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.3 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.2 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.1 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.2.0 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.1.4 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.1.3 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.1.2 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.1.1 lib/capistrano/elobuff/recipes/code.rb
capistrano-elobuff-0.1.0 lib/capistrano/elobuff/recipes/code.rb