Sha256: c99e4c8233b5bf493950f527d0945b51b9f5693704141c5eb1a187e988afa530

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

module Fastlane
  module Actions
    class GitTagExistsAction < Action
      def self.run(params)
        result = Actions.sh("git rev-parse -q --verify refs/tags/#{params[:tag].shellescape} || true", log: $verbose).chomp
        !result.empty?
      end

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

      def self.description
        "Checks if the git tag with the given name exists in the current repo"
      end

      def self.details
        nil
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :tag,
                                       description: "The tag name that should be checked")
        ]
      end

      def self.return_value
        "Boolean value whether the tag exists or not"
      end

      def self.output
        [
        ]
      end

      def self.authors
        ["antondomashnev"]
      end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fastlane-1.104.0 lib/fastlane/actions/git_tag_exists.rb
fastlane-1.103.0 lib/fastlane/actions/git_tag_exists.rb
fastlane-1.102.0 lib/fastlane/actions/git_tag_exists.rb
fastlane-1.101.0 lib/fastlane/actions/git_tag_exists.rb