Sha256: d670baa0ba6f25d8957ad8746242f6e80ce7c31d2f1656f88b04866e02f9d1df

Contents?: true

Size: 954 Bytes

Versions: 2

Compression:

Stored size: 954 Bytes

Contents

require "gem_publisher/publisher"
require "gem_publisher/version"

module GemPublisher

  # Publish a gem based on the supplied gemspec and version via
  # method, iff this version has not already been released and tagged
  # in the origin Git repository.
  #
  # If a remote tag matching the version already exists, nothing is done.
  # Otherwise, the gem is built, pushed, and tagged.
  #
  # Version should be a string of the form "1.2.3". Tags are expected to
  # be of the form "v1.2.3", and generated tags follow this pattern.
  #
  # Method should be one of :rubygems or :gemfury, and the requisite
  # credentials for the corresponding push command line tools must exist.
  #
  # Returns the gem file name if a gem was published; nil otherwise. A
  # CliFacade::Error will be raised if a command fails.
  #
  def self.publish_if_updated(gemspec, version, method=:rubygems)
    Publisher.new(gemspec, version).publish_if_updated(method)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gem_publisher-0.0.3 lib/gem_publisher.rb
gem_publisher-0.0.2 lib/gem_publisher.rb