Class: Fastlane::Actions::GetMarketingVersionBySchemeAndBuildConfigurationAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GetMarketingVersionBySchemeAndBuildConfigurationAction
- Defined in:
- lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_type ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
45 46 47 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 45 def self. ["Dileepa Sisila Chandrasekara"] end |
.available_options ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 29 def self. [ FastlaneCore::ConfigItem.new(key: :scheme, optional: false, description: "Specify a specific scheme if you have multiple per project"), FastlaneCore::ConfigItem.new(key: :build_configuration_name, optional: false, description: "Specify a specific build configuration if you have different build settings for each configuration") ] end |
.description ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 21 def self.description "Get the marketing version using scheme and build configuration" end |
.details ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 25 def self.details 'Gets the $(MARKETING_VERSION) build setting using scheme and build configuration' end |
.is_supported?(platform) ⇒ Boolean
53 54 55 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 53 def self.is_supported?(platform) %i[ios mac].include? platform end |
.output ⇒ Object
39 40 41 42 43 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 39 def self.output [ ['MARKETING_VERSION', 'The Marketign Version'] ] end |
.return_type ⇒ Object
49 50 51 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 49 def self.return_type :string end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/fastlane/plugin/xcode_build_configuration/actions/get_marketing_version_by_scheme_and_build_configuration.rb', line 7 def self.run(params) xcodeProject = Dir["*.xcodeproj"][0] config = { project: xcodeProject, scheme: params[:scheme], configuration: params[:build_configuration_name] } project = FastlaneCore::Project.new(config) project.select_scheme marketing_version = project.build_settings(key: 'MARKETING_VERSION') UI.user_error! "Cannot resolve $(MARKETING_VERSION) in for the scheme #{config.scheme} with the name #{params.configuration}" if marketing_version.nil? || marketing_version.empty? return marketing_version end |