Method: Application#initial_checkout
- Defined in:
- lib/application.rb
#initial_checkout ⇒ Object
Assuming that nothing is there except the application directory (below /srv) usually, this will do the initial checkout.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/application.rb', line 46 def initial_checkout # Prepare app environment, if needed. unless current.directory? && shared.directory? FileUtils.mkdir_p current FileUtils.chown_R 'app', 'app', current FileUtils.mkdir_p shared('tmp', 'pids') FileUtils.mkdir_p shared('log') FileUtils.chown_R 'app', 'app', shared end return false if current('.git').directory? panic "No checkout in place and no git reference to update to given. Use '--ref'. " \ unless ref info "Performing a complete initial installation." shell "git clone #{git_repo} ." shell "git checkout -B deployed #{ref}" File.write path('.ref'), ref info "Done. (initial installation)" return true end |