Skip to content

Instantly share code, notes, and snippets.

@lacostej
Created February 1, 2017 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacostej/7ac093cf035eb2a87a1559cc81fe8742 to your computer and use it in GitHub Desktop.
Save lacostej/7ac093cf035eb2a87a1559cc81fe8742 to your computer and use it in GitHub Desktop.
Support moooar platforms
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/jerome@wewanttoknow.com"]
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