Class: Rigup::Cli
- Inherits:
-
Thor
- Object
- Thor
- Rigup::Cli
- Includes:
- InstallUtils, Runability
- Defined in:
- lib/rigup/cli.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#release_path ⇒ Object
readonly
Returns the value of attribute release_path.
Instance Method Summary collapse
Methods included from InstallUtils
#apply_permissions, #ensure_link, #internal_permissions, #make_public_cache_dir, #override_folder, #permissions_for_web, #permissions_for_web_writable, #select_suffixed_file
Methods included from Runability
#bash, #cd, #pwd, #run, #run_for_all
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
7 8 9 |
# File 'lib/rigup/cli.rb', line 7 def context @context end |
#release_path ⇒ Object (readonly)
Returns the value of attribute release_path.
7 8 9 |
# File 'lib/rigup/cli.rb', line 7 def release_path @release_path end |
Instance Method Details
#deploy(aPath = nil) ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/rigup/cli.rb', line 153 def deploy(aPath=nil) init(aPath) update_cache #gem 'debugger'; require 'debugger'; debugger release call_release_command(:install) # call install_command if defined eg. defaults to "thor deploy:install" eg. make changes to files call_release_command(:block) link_live call_release_command(:restart) # call restart_command, defaults to "thor deploy:restart" eg. restart passenger call_release_command(:unblock) cleanup end |
#new(aGitUrl, aPath = nil) ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/rigup/cli.rb', line 135 def new(aGitUrl,aPath=nil) app_name = File.basename(aGitUrl,'.git') aPath ||= app_name init( aPath, git_url: aGitUrl, app_name: app_name, user: ENV['USER'] ) FileUtils.mkdir_p(site_dir) FileUtils.mkdir_p(File.join(site_dir,'releases')) FileUtils.mkdir_p(File.join(site_dir,'shared')) #+ create rigup.yml if doesn't exist, including option values context.config.to_hash.filter_exclude(:site_dir).to_yaml.to_file(File.join(site_dir,'rigup.yml')) end |