Sha256: 2e909b4c3a0a7512d162de849b8096885f0f8647168a5c948ab916a0399f3044

Contents?: true

Size: 1.11 KB

Versions: 178

Compression:

Stored size: 1.11 KB

Contents

require_relative '../helper'
require_relative 'app_identifier_guesser'

module FastlaneCore
  class ActionLaunchContext
    UNKNOWN_P_HASH = 'unknown'

    attr_accessor :action_name
    attr_accessor :p_hash
    attr_accessor :platform
    attr_accessor :configuration_language # example: ruby fastfile, swift fastfile

    def initialize(action_name: nil, p_hash: UNKNOWN_P_HASH, platform: nil, configuration_language: nil)
      @action_name = action_name
      @p_hash = p_hash
      @platform = platform
      @configuration_language = configuration_language
    end

    def self.context_for_action_name(action_name, configuration_language: "ruby", args: nil)
      app_id_guesser = FastlaneCore::AppIdentifierGuesser.new(args: args)
      return self.new(
        action_name: action_name,
        p_hash: app_id_guesser.p_hash || UNKNOWN_P_HASH,
        platform: app_id_guesser.platform,
        configuration_language: configuration_language
      )
    end

    def build_tool_version
      if platform == :android
        return 'android'
      else
        return "Xcode #{Helper.xcode_version}"
      end
    end
  end
end

Version data entries

178 entries across 178 versions & 1 rubygems

Version Path
fastlane-2.86.0.beta.20180309050025 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180308050114 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180307050101 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180306050019 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180305050037 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180304050031 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180303050048 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.85.0.beta.20180302050035 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.84.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.84.0.beta.20180301050048 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.84.0.beta.20180228050122 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.84.0.beta.20180227050054 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.83.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.83.0.beta.20180226050016 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.83.0.beta.20180225050035 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.83.0.beta.20180224050047 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.82.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.82.0.beta.20180223010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.82.0.beta.20180222010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb