Class: Yolo::Deployment::TestFlight

Inherits:
BaseDeployer show all
Defined in:
lib/yolo/deployment/test_flight.rb

Overview

Deploys IPA’s using testflight

Author:

  • Alex Fish

Instance Attribute Summary

Attributes inherited from BaseDeployer

#package_path, #url

Instance Method Summary collapse

Methods inherited from BaseDeployer

#initialize

Constructor Details

This class inherits a constructor from Yolo::Deployment::BaseDeployer

Instance Method Details

#deploy(package_path, opts = {}, &block) ⇒ Object

Overides the super deploy method

Parameters:

  • package_path (String)

    A full path to the package to deploy

  • opts (Hash) (defaults to: {})

    A hash of deployment options

  • block (Block)

    Block fired on completing



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/yolo/deployment/test_flight.rb', line 19

def deploy(package_path, opts={}, &block)
  response = ""
  @completion_block = block
  @progress_formatter = Yolo::Formatters::ProgressFormatter.new
  @progress_formatter.deploying_ipa(package_path)

  dsym_zip_path = generate_dsym_zip(package_path)

  IO.popen(curl_string(package_path, dsym_zip_path, opts)) do |io|
    begin
      while line = io.readline
        response << line
      end
      if response.length == 0
        @error_formatter.deploy_failed("Upload error")
      end
    rescue EOFError
    end
  end
  upload_complete(response) if response.length > 0
end