Class: Seagull::DeploymentStrategies::Crashlytics

Inherits:
DeploymentStrategy show all
Defined in:
lib/seagull/deployment_strategies/crashlytics.rb

Instance Method Summary collapse

Methods inherited from DeploymentStrategy

#configure, #defaults, #initialize, #release_notes

Constructor Details

This class inherits a constructor from Seagull::DeploymentStrategies::DeploymentStrategy

Instance Method Details

#deployObject



19
20
21
22
23
24
25
26
27
# File 'lib/seagull/deployment_strategies/crashlytics.rb', line 19

def deploy
  cmd = []
  cmd <<"#{@configuration.deploy.crashlytics_location}/submit"
  cmd << @configuration.deploy.api_key
  cmd << @configuration.deploy.build_secret
  cmd << "-ipaPath #{Shellwords.escape(@configuration.ipa_full_path(@configuration.active_release_type))}"

  system(cmd.join(' '))
end

#prepareObject

Nothing to prepare



10
11
12
13
14
15
16
17
# File 'lib/seagull/deployment_strategies/crashlytics.rb', line 10

def prepare
  unless @configuration.deploy.crashlytics_location
    if dir = ['./', 'Pods/CrashlyticsFramework'].find{|d| ::File.directory?("#{d}/Crashlytics.framework")}
      @configuration.deploy.crashlytics_location = "#{dir}/Crashlytics.framework"
    end
  end
  raise "Please provide Crashlytics location" unless ::File.directory?(@configuration.deploy.crashlytics_location)
end