Sha256: 4d42431735e6c49d53483867b90686d79e065ef025906bf820f67b63ed5118b8

Contents?: true

Size: 1.52 KB

Versions: 26

Compression:

Stored size: 1.52 KB

Contents

module Fastlane
  module Actions
    module SharedValues
    end

    class MinFastlaneVersionAction < Action
      def self.run(params)
        params = nil unless params.kind_of?(Array)
        value = (params || []).first
        defined_version = Gem::Version.new(value) if value

        UI.user_error!("Please pass minimum fastlane version as parameter to min_fastlane_version") unless defined_version

        if Gem::Version.new(Fastlane::VERSION) < defined_version
          FastlaneCore::UpdateChecker.show_update_message('fastlane', Fastlane::VERSION)
          error_message = "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}."
          UI.user_error!(error_message)
        end

        UI.message("Your fastlane version #{Fastlane::VERSION} matches the minimum requirement of #{defined_version}  ✅")
      end

      def self.step_text
        "Verifying required fastlane version"
      end

      def self.author
        "KrauseFx"
      end

      def self.description
        "Verifies the minimum fastlane version required"
      end

      def self.example_code
        ['min_fastlane_version "1.50.0"']
      end

      def self.details
        [
          "Add this to your `Fastfile` to require a certain version of _fastlane_.",
          "Use it if you use an action that just recently came out and you need it."
        ].join("\n")
      end

      def self.category
        :misc
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
fastlane-2.73.0.beta.20180104010004 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.73.0.beta.20180103010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20180102010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20180101010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20171231010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.1 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20171230010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20171229010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.72.0.beta.20171228010004 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171227010004 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171226010004 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171225010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171224010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171223010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171222010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.70.3 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.71.0.beta.20171221010003 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.70.2 fastlane/lib/fastlane/actions/min_fastlane_version.rb