Sha256: 58eaf31c08d7527d47f2683552632a2a72ba3c59a2b02bbbb800bed887dbd4d7

Contents?: true

Size: 1.07 KB

Versions: 24

Compression:

Stored size: 1.07 KB

Contents

require 'fastlane_core/helper'

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

24 entries across 24 versions & 1 rubygems

Version Path
fastlane-2.74.0.beta.20180106010004 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.73.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.73.0.beta.20180105010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.73.0.beta.20180104010004 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.73.0.beta.20180103010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20180102010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20180101010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20171231010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.1 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20171230010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20171229010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.72.0.beta.20171228010004 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171227010004 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171226010004 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171225010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171224010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171223010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
fastlane-2.71.0.beta.20171222010003 fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb