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.6.9 scripts/update.rb
standup-0.6.8 scripts/update.rb
standup-0.6.7 scripts/update.rb
standup-0.6.6 scripts/update.rb
standup-0.6.5 scripts/update.rb
standup-0.6.4 scripts/update.rb
standup-0.6.3 scripts/update.rb
standup-0.6.2 scripts/update.rb
standup-0.6.1 scripts/update.rb
standup-0.6.0 scripts/update.rb
standup-0.5.14 scripts/update.rb
standup-0.5.13 scripts/update.rb
standup-0.5.11 scripts/update.rb
standup-0.5.10 scripts/update.rb
standup-0.5.9 scripts/update.rb
standup-0.5.8 scripts/update.rb
standup-0.5.7 scripts/update.rb
standup-0.5.6 scripts/update.rb
standup-0.5.5 scripts/update.rb
standup-0.5.4 scripts/update.rb