Class: Capistrano::SCM::GitLocal

Inherits:
Plugin
  • Object
show all
Defined in:
lib/capistrano/nomad/scm/git_local.rb

Instance Method Summary collapse

Instance Method Details

#define_tasksObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/capistrano/nomad/scm/git_local.rb', line 5

def define_tasks
  namespace :git_local do
    task :set_current_revision do
      on release_roles :manager do
        set :current_revision, capistrano_nomad_git_commit_id
      end
    end

    task :create_release do
      on release_roles :manager do
        execute :mkdir, "-p", release_path
      end
    end
  end
end

#register_hooksObject



21
22
23
24
# File 'lib/capistrano/nomad/scm/git_local.rb', line 21

def register_hooks
  before "deploy:set_current_revision", "git_local:set_current_revision"
  after "deploy:new_release_path", "git_local:create_release"
end