Sha256: 800a96b7bac6f730b9d2dd28470399896dc044284411c87e3881f8bd5a9130c5

Contents?: true

Size: 759 Bytes

Versions: 39

Compression:

Stored size: 759 Bytes

Contents

namespace :git do
  desc 'Git pull for common code project'
  task :pull_common do
    on roles(:app) do
      within "/var/www/common" do
        execute :git, :pull, :origin, :master
      end if test("[ -d /var/www/common ]")
    end
  end
  after "deploy:updating", "git:pull_common"

  desc 'Deploy from local git repository'
  task :deploy_from_local_repo do
    set :repo_url,  "file:///tmp/.git"
    run_locally do
      execute "tar -zcvf /tmp/repo.tgz .git"
    end
    on roles(:all) do
      upload! '/tmp/repo.tgz', '/tmp/repo.tgz'
      execute 'tar -zxvf /tmp/repo.tgz -C /tmp'
    end
  end

  desc 'Removes repo (useful when repo_url changes)'
  task :remove_repo do
    on roles(:all) do
      execute "rm -r #{repo_path}"
    end
  end

end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
prun-ops-0.3.4 lib/capistrano/git.rake
prun-ops-0.3.3 lib/capistrano/git.rake
prun-ops-0.3.2 lib/capistrano/git.rake
prun-ops-0.3.1 lib/capistrano/git.rake
prun-ops-0.3.0 lib/capistrano/git.rake
prun-ops-0.2.18 lib/capistrano/git.rake
prun-ops-0.2.17 lib/capistrano/git.rake
prun-ops-0.2.16 lib/capistrano/git.rake
prun-ops-0.2.15 lib/capistrano/git.rake
prun-ops-0.2.14 lib/capistrano/git.rake
prun-ops-0.2.13 lib/capistrano/git.rake
prun-ops-0.2.12 lib/capistrano/git.rake
prun-ops-0.2.11 lib/capistrano/git.rake
prun-ops-0.2.10 lib/capistrano/git.rake
prun-ops-0.2.9 lib/capistrano/git.rake
prun-ops-0.2.8 lib/capistrano/git.rake
prun-ops-0.2.7 lib/capistrano/git.rake
prun-ops-0.2.6 lib/capistrano/git.rake
prun-ops-0.2.4 lib/capistrano/git.rake
prun-ops-0.2.3 lib/capistrano/git.rake