Sha256: f67c774841b3fc3be16196c2d2fcc8e3835c940c1d5dc7f0544cd3006dcb5de1

Contents?: true

Size: 1.58 KB

Versions: 65

Compression:

Stored size: 1.58 KB

Contents

module Fastlane
  module Actions
    class VersionGetPodspecAction < Action
      def self.run(params)
        podspec_path = params[:path]

        raise "Could not find podspec file at path '#{podspec_path}'".red unless File.exist? podspec_path

        version_podspec_file = Helper::PodspecHelper.new(podspec_path)

        Actions.lane_context[SharedValues::PODSPEC_VERSION_NUMBER] = version_podspec_file.version_value
      end

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        "Receive the version number from a podspec file"
      end

      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",
                                       is_string: true,
                                       default_value: Dir["*.podspec"].last,
                                       verify_block: proc do |value|
                                         raise "Please pass a path to the `version_get_podspec` action".red if value.length == 0
                                       end)
        ]
      end

      def self.output
        [
          ['PODSPEC_VERSION_NUMBER', 'The podspec version number']
        ]
      end

      def self.authors
        ["Liquidsoul", "KrauseFx"]
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
fastlane-1.68.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.67.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.66.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.65.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.64.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.63.1 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.63.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.62.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.61.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.60.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.59.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.58.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.57.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.56.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.55.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.54.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.53.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.52.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.51.0 lib/fastlane/actions/version_get_podspec.rb
fastlane-1.50.0 lib/fastlane/actions/version_get_podspec.rb