Created
February 1, 2017 18:27
-
-
Save lacostej/7ac093cf035eb2a87a1559cc81fe8742 to your computer and use it in GitHub Desktop.
Support moooar platforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fastlane | |
class SupportedPlatforms | |
@@previous = Fastlane::SupportedPlatforms.all | |
class << self | |
attr_accessor :extra | |
end | |
@extra = [] | |
def self.all | |
(@@previous + @extra).flatten | |
end | |
end | |
end | |
module Fastlane | |
module Actions | |
class InjectPlatformsAction < Action | |
def self.run(params) | |
UI.message "Checking environment variable: #{Fastlane::SupportedPlatforms.all}" | |
Fastlane::SupportedPlatforms.extra = params[:extra_platforms] | |
UI.message "After injecting extra platforms (#{params[:extra_platforms]})...: #{Fastlane::SupportedPlatforms.all}" | |
end | |
##################################################### | |
# @!group Documentation | |
##################################################### | |
def self.description | |
"Modify the default list of supported platforms" | |
end | |
#def self.details | |
#end | |
def self.available_options | |
[ | |
FastlaneCore::ConfigItem.new(key: :extra_platforms, | |
optional: false, | |
type: Array, | |
default_value: "", | |
description: "The optional extra platforms to support" | |
), | |
] | |
end | |
def self.output | |
[ | |
] | |
end | |
def self.return_value | |
end | |
def self.authors | |
["lacostej/[email protected]"] | |
end | |
def self.is_supported?(platform) | |
true | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment