Sha256: 51f41ae128d9e430776980c9c973c71359c9f1ccf192abc8b010cc62c787ca09

Contents?: true

Size: 518 Bytes

Versions: 23

Compression:

Stored size: 518 Bytes

Contents

Standup.script :node do
  self.description = 'Update web application'
  
  def run
    in_dir scripts.webapp.project_path do
      sudo 'chown -R ubuntu:ubuntu .'

      exec 'git checkout HEAD .'
      exec 'git pull'

      scripts.webapp.checkout_branch

      sudo "chown -R www-data:www-data ."
    end

    update_webapp

    scripts.webapp.restart
  end
  
  protected
  
  def update_webapp
    scripts.webapp.install_gems

    scripts.webapp.with_environment do
      exec 'rake db:migrate'
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
standup-0.5.3 scripts/update.rb
standup-0.5.1 scripts/update.rb
standup-0.5.0 scripts/update.rb