Sha256: a11e7a24df3c6f7c51631547944ad39ea028c4fe100dae15503c5b699cb7ba0a

Contents?: true

Size: 1.68 KB

Versions: 17

Compression:

Stored size: 1.68 KB

Contents

module RhoDevelopment

  class BuildServer

    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

    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

    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

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

    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

  end

end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rhodes-7.6.0 lib/build/development/build_server.rb
rhodes-7.5.1 lib/build/development/build_server.rb
rhodes-7.4.1 lib/build/development/build_server.rb
rhodes-7.1.17 lib/build/development/build_server.rb
rhodes-6.2.0 lib/build/development/build_server.rb
rhodes-6.0.11 lib/build/development/build_server.rb
rhodes-5.5.18 lib/build/development/build_server.rb
rhodes-5.5.17 lib/build/development/build_server.rb
rhodes-5.5.15 lib/build/development/build_server.rb
rhodes-5.5.0.22 lib/build/development/build_server.rb
rhodes-5.5.2 lib/build/development/build_server.rb
rhodes-5.5.0.7 lib/build/development/build_server.rb
rhodes-5.5.0.3 lib/build/development/build_server.rb
rhodes-5.5.0 lib/build/development/build_server.rb
tauplatform-1.0.3 lib/build/development/build_server.rb
tauplatform-1.0.2 lib/build/development/build_server.rb
tauplatform-1.0.1 lib/build/development/build_server.rb