fastlane/lib/fastlane/supported_platforms.rb in fastlane-2.14.2 vs fastlane/lib/fastlane/supported_platforms.rb in fastlane-2.15.0.beta.20170213032052
- old
+ new
@@ -1,18 +1,28 @@
module Fastlane
class SupportedPlatforms
+ class << self
+ attr_accessor :extra
+ attr_reader :default
+
+ def extra=(value)
+ value ||= []
+ UI.important("Setting '#{value}' as extra SupportedPlatforms")
+ @extra = value
+ end
+ end
+
+ @default = [:ios, :mac, :android]
+ @extra = []
+
def self.all
- [
- :ios,
- :mac,
- :android
- ]
+ (@default + @extra).flatten
end
- # this will throw an exception if the passed platform is not supported
+ # this will log a warning if the passed platform is not supported
def self.verify!(platform)
unless all.include? platform.to_s.to_sym
- UI.user_error!("Platform '#{platform}' is not supported. Must be either #{self.all}")
+ UI.important("Platform '#{platform}' is not officially supported. Currently supported plaforms are #{self.all}.")
end
end
end
end