Method: Application#update_application

Defined in:
lib/application.rb

#update_applicationObject



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/application.rb', line 86

def update_application
  info "Performing an app update."
  
  # Write down the update intention (so we can repeat this easily)
  File.write path('.ref'), ref
  
  # Then try to update
  shell "git reset --hard #{ref}"
  
  # Install gems
  # FIXME: THIS DOES CURRENTLY NOT WORK BECAUSE OF PROXY CONFIGURATION ISSSUES
  #shell "bundle install --deployment \
  #  --without test spec development cucumber mac jruby"
  info "!!!! execute the following as 'app' in /srv/<app>/current"
  info "bundle install --deployment --without test spec development cucumber mac jruby" 
  # Create a few directories that the app also wants. 
  %w(tmp log).each do |dir_name|
    begin
      FileUtils.ln_sf shared(dir_name), current
    rescue Errno::EEXIST
      warn "Target directory (#{dir_name}) already exists."
    end
  end
  
  info "Done (app update)."
end