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.5.3 scripts/upload_db.rb
standup-0.5.1 scripts/upload_db.rb
standup-0.5.0 scripts/upload_db.rb
standup-0.4.0 scripts/upload_db.rb
standup-0.3.37 scripts/upload_db.rb
standup-0.3.36 scripts/upload_db.rb
standup-0.3.35 scripts/upload_db.rb
standup-0.3.34 scripts/upload_db.rb
standup-0.3.33 scripts/upload_db.rb
standup-0.3.32 scripts/upload_db.rb
standup-0.3.31 scripts/upload_db.rb
standup-0.3.30 scripts/upload_db.rb
standup-0.3.29 scripts/upload_db.rb
standup-0.3.28 scripts/upload_db.rb
standup-0.3.27 scripts/upload_db.rb
standup-0.3.26 scripts/upload_db.rb
standup-0.3.25 scripts/upload_db.rb
standup-0.3.24 scripts/upload_db.rb
standup-0.3.23 scripts/upload_db.rb
standup-0.3.22 scripts/upload_db.rb