Class: Fastlane::Actions::BuildNumberGetFromXcconfigAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::BuildNumberGetFromXcconfigAction
- Defined in:
- lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .run(options) ⇒ Object
Class Method Details
.authors ⇒ Object
36 37 38 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 36 def self. ["Dima Vorona", "Yalantis"] end |
.available_options ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 18 def self. [ FastlaneCore::ConfigItem.new( key: :xcconfig_path, env_name: "BUILD_NUMBER_XCCONFIG_PATH", description: "Path to the xcconfig file with Build Number", type: String, verify_block: proc do |value| UI.user_error!("Couldn't find .xcconfig file at path '#{value}'") unless File.exist?(File.(value)) end ) ] end |
.description ⇒ Object
14 15 16 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 14 def self.description "Read Build Number from the passed xcconfig" end |
.is_supported?(platform) ⇒ Boolean
40 41 42 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 40 def self.is_supported?(platform) [:ios, :mac].include?(platform) end |
.output ⇒ Object
32 33 34 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 32 def self.output [] end |
.run(options) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/fastlane/plugin/yalantis_ci/actions/build_number_get_from_xcconfig.rb', line 6 def self.run() path = [:xcconfig_path] contents = File.read(path) match = /(?<=\bCURRENT_PROJECT_VERSION\s=\s)(?<value>[\d]+)/.match(contents) return match[:value] unless match.nil? end |