Sha256: 796fe256592ca089e40cffec810baf38984de90fc678df273fb758d3e0d891ac

Contents?: true

Size: 1.5 KB

Versions: 429

Compression:

Stored size: 1.5 KB

Contents

module Fastlane
  module Actions
    module SharedValues
    end

    class FastlaneVersionAction < 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 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
        ['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

429 entries across 429 versions & 1 rubygems

Version Path
fastlane-2.38.0.beta.20170610010032 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.38.0.beta.20170609010035 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.38.0.beta.20170608010030 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.38.0.beta.20170607010024 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.38.0.beta.20170606010029 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0.beta.20170605010054 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0.beta.20170604010021 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0.beta.20170603010102 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0.beta.20170602010027 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.37.0.beta.20170601010043 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170531010050 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170530010040 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170529010025 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170528010028 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170527010029 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.35.1 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170526010038 fastlane/lib/fastlane/actions/fastlane_version.rb
fastlane-2.36.0.beta.20170525010052 fastlane/lib/fastlane/actions/fastlane_version.rb