Method: RhoDevelopment::BuildServer#copy_platform_bundle_to_web_server_root

Defined in:
lib/build/development/build_server.rb

#copy_platform_bundle_to_web_server_root(platform, sourceFilename, targetFilename) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/build/development/build_server.rb', line 29

def copy_platform_bundle_to_web_server_root(platform, sourceFilename, targetFilename)
  case platform
    when 'iphone'
      tmp = 'iOS'
    when 'android'
      tmp = 'android'
    when 'wm'
      tmp = 'MC3000c50b (ARMV4I)'
    else
      tmp = platform
  end
  from = File.join(Configuration::application_root,'bin', 'target', tmp, sourceFilename)
  to = File.join(Configuration::document_root, 'download', platform, targetFilename)
  puts "Copy to #{to.to_s}".warning
  FileUtils.mkpath(File.dirname(to))
  FileUtils.cp(from, to)
end