Class: Capistrano::SCM::LocalGitUpload
- Inherits:
-
Plugin
- Object
- Plugin
- Capistrano::SCM::LocalGitUpload
- Defined in:
- lib/capistrano/scm/local_git_upload.rb
Overview
Capistrano SCM plugin for local git clone followed by upload
Instance Method Summary collapse
- #define_tasks ⇒ Object
-
#initialize ⇒ LocalGitUpload
constructor
A new instance of LocalGitUpload.
- #register_hooks ⇒ Object
- #set_defaults ⇒ Object
Constructor Details
#initialize ⇒ LocalGitUpload
Returns a new instance of LocalGitUpload.
27 28 29 30 |
# File 'lib/capistrano/scm/local_git_upload.rb', line 27 def initialize super @git_plugin = Capistrano::SCM::Git.new end |
Instance Method Details
#define_tasks ⇒ Object
40 41 42 43 |
# File 'lib/capistrano/scm/local_git_upload.rb', line 40 def define_tasks eval_rakefile File.('tasks/git_local.rake', __dir__) eval_rakefile File.('tasks/upload.rake', __dir__) end |
#register_hooks ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/capistrano/scm/local_git_upload.rb', line 45 def register_hooks before 'deploy:check', 'upload:check_directory' before 'deploy:started', 'git_local:create_work' after 'deploy:new_release_path', 'upload:create_release' before 'deploy:set_current_revision', 'git_local:set_current_revision' after 'deploy:finishing', 'git_local:remove_directory' after 'deploy:finishing', 'upload:remove_directory' end |
#set_defaults ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/capistrano/scm/local_git_upload.rb', line 32 def set_defaults @git_plugin.set_defaults set_if_empty :local_top, Dir.getwd set_if_empty :repo_path, local_path('repo') set_if_empty :work_path, local_path('work') set_if_empty :upload_path, local_path('upload') end |