Class: RhoDevelopment::BuildServer

Inherits:
Object
  • Object
show all
Defined in:
lib/build/development/build_server.rb

Instance Method Summary collapse

Instance Method Details

#build_full_bundle_for_subscriber(aSubscriber, aFilename) ⇒ Object



17
18
19
20
21
# File 'lib/build/development/build_server.rb', line 17

def build_full_bundle_for_subscriber(aSubscriber, aFilename)
  RhoDevelopment.setup(Configuration::development_directory, aSubscriber.normalized_platform_name)
  RhoDevelopment.make_full_bundle
  self.copy_platform_bundle_to_web_server_root(aSubscriber.normalized_platform_name, Configuration::full_bundle_name, aFilename)
end

#build_full_bundles_for_all_subscribers(aFilename) ⇒ Object



23
24
25
26
27
# File 'lib/build/development/build_server.rb', line 23

def build_full_bundles_for_all_subscribers(aFilename)
  Configuration::enabled_subscribers.each { |each|
    self.build_full_bundle_for_subscriber(each, aFilename)
  }
end

#build_partial_bundle_for_platform(aPlatform, aFilename) ⇒ Object



11
12
13
14
15
# File 'lib/build/development/build_server.rb', line 11

def build_partial_bundle_for_platform(aPlatform, aFilename)
  RhoDevelopment.setup(Configuration::development_directory, aPlatform)
  RhoDevelopment.make_partial_bundle
  self.copy_platform_bundle_to_web_server_root(aPlatform, Configuration::partial_bundle_name, aFilename)
end

#build_partial_bundles_for_all_subscribers(aFilename) ⇒ Object



5
6
7
8
9
# File 'lib/build/development/build_server.rb', line 5

def build_partial_bundles_for_all_subscribers(aFilename)
  Configuration::enabled_subscribers.each { |each|
    self.build_partial_bundle_for_platform(each.normalized_platform_name, aFilename)
  }
end

#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