Sha256: e422c37942c698adb77d09f3285b46e5dbbe433a93282ba1ba666a9f19224fa0

Contents?: true

Size: 1.74 KB

Versions: 32

Compression:

Stored size: 1.74 KB

Contents

module Fastlane
  class ActionCollector < FastlaneCore::ToolCollector
    # Is this an official fastlane action, that is bundled with fastlane?
    def is_official?(name)
      return true if name == :lane_switch
      Actions.get_all_official_actions.include?(name)
    end

    def name_to_track(name)
      return name if is_official?(name)

      Fastlane.plugin_manager.plugin_references.each do |plugin_name, value|
        return "#{plugin_name}/#{name}" if value[:actions].include?(name)
      end

      return nil
    end

    def show_message
      UI.message("Sending Crash/Success information. More information on: https://github.com/fastlane/enhancer")
      UI.message("No personal/sensitive data is sent. Only sharing the following:")
      UI.message(launches)
      UI.message(@error) if @error
      UI.message("This information is used to fix failing actions and improve integrations that are often used.")
      UI.message("You can disable this by adding `opt_out_usage` to your Fastfile")
    end

    def determine_version(name)
      self.class.determine_version(name)
    end

    # e.g.
    #   :gym
    #   :xcversion
    #   "fastlane-plugin-my_plugin/xcversion"
    def self.determine_version(name)
      result = super(name)
      return result if result

      if name.to_s.include?(PluginManager.plugin_prefix)
        # That's an action from a plugin, we need to fetch its version number
        begin
          plugin_name = name.split("/").first.gsub(PluginManager.plugin_prefix, '')
          return Fastlane.const_get(plugin_name.fastlane_class)::VERSION
        rescue => ex
          UI.verbose(ex)
          return "undefined"
        end
      end

      return Fastlane::VERSION # that's the case for all built-in actions
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
fastlane-2.0.4 fastlane/lib/fastlane/action_collector.rb
fastlane-2.0.3 fastlane/lib/fastlane/action_collector.rb
fastlane-2.0.2 fastlane/lib/fastlane/action_collector.rb
fastlane-2.0.1 fastlane/lib/fastlane/action_collector.rb
fastlane-1.111.0 lib/fastlane/action_collector.rb
fastlane-1.110.0 lib/fastlane/action_collector.rb
fastlane-1.109.0 lib/fastlane/action_collector.rb
fastlane-1.108.0 lib/fastlane/action_collector.rb
fastlane-1.107.0 lib/fastlane/action_collector.rb
fastlane-1.106.2 lib/fastlane/action_collector.rb
fastlane-1.106.1 lib/fastlane/action_collector.rb
fastlane-1.106.0 lib/fastlane/action_collector.rb
fastlane-1.105.3 lib/fastlane/action_collector.rb
fastlane-1.105.2 lib/fastlane/action_collector.rb
fastlane-1.105.1 lib/fastlane/action_collector.rb
fastlane-1.105.0 lib/fastlane/action_collector.rb
fastlane-1.104.0 lib/fastlane/action_collector.rb
fastlane-1.103.0 lib/fastlane/action_collector.rb
fastlane-1.102.0 lib/fastlane/action_collector.rb
fastlane-1.101.0 lib/fastlane/action_collector.rb