Sha256: 379450c3c94a36874122da5a1c9b2b79694506958c0eb20025ce102c4c4420e8

Contents?: true

Size: 1.53 KB

Versions: 501

Compression:

Stored size: 1.53 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 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

501 entries across 501 versions & 5 rubygems

Version Path
fastlane-2.113.0 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190107200010 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190106200016 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190105200036 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190104200013 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190103200013 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190102200016 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20190101200013 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181231200027 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181230200014 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181229200101 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181228200027 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181227200058 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181226200116 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181225200026 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181224200038 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181223200038 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181222200027 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181221200014 fastlane/lib/fastlane/actions/min_fastlane_version.rb
fastlane-2.113.0.beta.20181220200101 fastlane/lib/fastlane/actions/min_fastlane_version.rb