Sha256: 24f5b5a12ced8c2d1106c611a8735f80cdf943973f58c74d34aaa6a8521a1ab5

Contents?: true

Size: 979 Bytes

Versions: 3

Compression:

Stored size: 979 Bytes

Contents

module Fastlane
  module Actions
    module SharedValues
      DEFAULT_PLATFORM = :DEFAULT_PLATFORM
    end

    class DefaultPlatformAction < Action
      def self.run(params)
        UI.user_error!("You forgot to pass the default platform") if params.first.nil?

        platform = params.first.to_sym

        SupportedPlatforms.verify!(platform)

        Actions.lane_context[SharedValues::DEFAULT_PLATFORM] = platform
      end

      def self.description
        "Defines a default platform to not have to specify the platform"
      end

      def self.output
        [
          ['DEFAULT_PLATFORM', 'The default platform']
        ]
      end

      def self.example_code
        [
          'default_platform(:android)'
        ]
      end

      def self.category
        :misc
      end

      def self.author
        "KrauseFx"
      end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 fastlane/lib/fastlane/actions/default_platform.rb
fastlane_hotfix-2.165.0 fastlane/lib/fastlane/actions/default_platform.rb
fastlane_hotfix-2.187.0 fastlane/lib/fastlane/actions/default_platform.rb