Sha256: a48962afa89ad7f5c52909b0f77ce3e5ff35f5300fd043ff7de4633c747b993f

Contents?: true

Size: 1008 Bytes

Versions: 2

Compression:

Stored size: 1008 Bytes

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

        raise "Please pass minimum fastlane version as parameter to fastlane_version".red unless defined_version

        if Gem::Version.new(Fastlane::VERSION) < defined_version
          raise "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}. Please update using `sudo gem update fastlane`.".red
        end

        UI.message("fastlane version valid")
      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.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fastlane-1.68.0 lib/fastlane/actions/fastlane_version.rb
fastlane-1.67.0 lib/fastlane/actions/fastlane_version.rb