Sha256: 399e576224abb7eab6141c9bde5fe30c4b85f6ff13b0c9380ad7a55fcfffc7dd

Contents?: true

Size: 497 Bytes

Versions: 50

Compression:

Stored size: 497 Bytes

Contents

Standup.script :node do
  self.description = 'Upload Rails application database from local server to node'
  
  def run
    local_exec "mkdir -p tmp/db"
    local_exec "#{scripts.webapp.db.dump_command scripts.webapp.db_name} > tmp/db/dump.sql"
    
    in_temp_dir do |dir|
      upload 'tmp/db/dump.sql',
             :to => "#{dir}/dump.sql"
      exec "chmod 777 #{dir}/dump.sql"
      
      exec "#{scripts.webapp.db.load_command scripts.webapp.db_name} < #{dir}/dump.sql"
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
standup-0.6.9 scripts/upload_db.rb
standup-0.6.8 scripts/upload_db.rb
standup-0.6.7 scripts/upload_db.rb
standup-0.6.6 scripts/upload_db.rb
standup-0.6.5 scripts/upload_db.rb
standup-0.6.4 scripts/upload_db.rb
standup-0.6.3 scripts/upload_db.rb
standup-0.6.2 scripts/upload_db.rb
standup-0.6.1 scripts/upload_db.rb
standup-0.6.0 scripts/upload_db.rb
standup-0.5.14 scripts/upload_db.rb
standup-0.5.13 scripts/upload_db.rb
standup-0.5.11 scripts/upload_db.rb
standup-0.5.10 scripts/upload_db.rb
standup-0.5.9 scripts/upload_db.rb
standup-0.5.8 scripts/upload_db.rb
standup-0.5.7 scripts/upload_db.rb
standup-0.5.6 scripts/upload_db.rb
standup-0.5.5 scripts/upload_db.rb
standup-0.5.4 scripts/upload_db.rb