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.3.20 scripts/upload_db.rb
standup-0.3.19 scripts/upload_db.rb
standup-0.3.18 scripts/upload_db.rb
standup-0.3.17 scripts/upload_db.rb
standup-0.3.16 scripts/upload_db.rb
standup-0.3.15 scripts/upload_db.rb
standup-0.3.14 scripts/upload_db.rb
standup-0.3.13 scripts/upload_db.rb
standup-0.3.12 scripts/upload_db.rb
standup-0.3.11 scripts/upload_db.rb