Class: Fastlane::Actions::DeployFileProviderAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::DeployFileProviderAction
- Defined in:
- lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb
Constant Summary collapse
- RUN_VARIANT_ANDROID =
"android"
- RUN_VARIANT_IOS =
"ios"
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb', line 35 def self. ["Kamil Krzyk, Przemysław Wośko"] end |
.available_options ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb', line 39 def self. [ FastlaneCore::ConfigItem.new(key: :platform, env_name: "DEPLOY_FOR_PLATFORM", description: "For which platform files should be prepared", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :apiCredentialsPath, env_name: "API_CREDENTIALS_PATH", description: "File that contains your OAuth2.0 data", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :spreadsheetId, env_name: "SPREADSHEET_ID", description: "Your spreadsheet id", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :spreadsheetApplicationName, env_name: "SPREADSHEET_APPLICATION_NAME", description: "Your google plafrom application name", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :credentialsPath, env_name: "SPREADSHEET_APPLICATION_NAME", description: "Sphreadsheet OAuth2 credentials url", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :metaDataRoot, env_name: "METADATA_ROOT", description: "Path to metadata root location", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :json_key, env_name: "STORE_CREDENTIALS", description: "Location of file allowing you to access app/play store", is_string: true, optional: true), FastlaneCore::ConfigItem.new(key: :appVersion, env_name: "APP_VERSION", description: "App version", is_string: true, optional: true) ] end |
.description ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb', line 31 def self.description "Prepares metadata files with structure ready for AppStore, PlayStore deploy" end |
.is_supported?(platform) ⇒ Boolean
87 88 89 |
# File 'lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb', line 87 def self.is_supported?(platform) platform == :android || platform == :ios end |
.run(params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fastlane/plugin/deploy_file_provider/actions/deploy_file_provider_action.rb', line 11 def self.run(params) UI.("DeployFileProvider plugin starts running!".yellow) # Init variables platform = "#{params[:platform]}".downcase # Checking for metadata changes country_MetaData = Provider::MetadataChangesProvider.fetchMetaDataChanges(params) # Running plugin for specific platform if platform.eql? RUN_VARIANT_ANDROID Helper::AndroidFileHelper.prepareFiles(params, country_MetaData) elsif platform.eql? RUN_VARIANT_IOS Helper::IOSFileHelper.prepareFiles(params, country_MetaData) else UI.("Error: Unknown platform. Plugin won't run!".red) raise Exception, "Lane was stopped by script" end end |