class Fastlane::Actions::VersionGetPodspecAction
Public Class Methods
available_options()
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 26 def self.available_options [ FastlaneCore::ConfigItem.new(key: :path, env_name: "FL_VERSION_PODSPEC_PATH", description: "You must specify the path to the podspec file", code_gen_sensitive: true, default_value: Dir["*.podspec"].last, default_value_dynamic: true, verify_block: proc do |value| UI.user_error!("Please pass a path to the `version_get_podspec` action") if value.length == 0 end), FastlaneCore::ConfigItem.new(key: :require_variable_prefix, env_name: "FL_VERSION_BUMP_PODSPEC_VERSION_REQUIRE_VARIABLE_PREFIX", description: "true by default, this is used for non CocoaPods version bumps only", type: Boolean, default_value: true) ] end
category()
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 65 def self.category :misc end
description()
click to toggle source
@!group Documentation
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 22 def self.description "Receive the version number from a podspec file" end
example_code()
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 59 def self.example_code [ 'version = version_get_podspec(path: "TSMessages.podspec")' ] end
is_supported?(platform)
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 55 def self.is_supported?(platform) [:ios, :mac].include?(platform) end
output()
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 45 def self.output [ ['PODSPEC_VERSION_NUMBER', 'The podspec version number'] ] end
run(params)
click to toggle source
# File fastlane/lib/fastlane/actions/version_get_podspec.rb, line 8 def self.run(params) podspec_path = params[:path] UI.user_error!("Could not find podspec file at path '#{podspec_path}'") unless File.exist?(podspec_path) version_podspec_file = Helper::PodspecHelper.new(podspec_path, params[:require_variable_prefix]) Actions.lane_context[SharedValues::PODSPEC_VERSION_NUMBER] = version_podspec_file.version_value end