Sha256: db73842a47f708f651278020ba60bc018ea6d464954ec0de1727805c28c91b1f

Contents?: true

Size: 666 Bytes

Versions: 11

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

require "versionaire"

module Milestoner
  module Tags
    # Handles publishing of tags to a remote repository.
    class Pusher
      include Import[:git, :logger]

      using Versionaire::Cast

      def call configuration = Container[:configuration]
        version = Version configuration.version

        fail Error, "Remote repository not configured." unless git.origin?
        fail Error, "Remote tag exists: #{version}." if git.tag_remote? version
        fail Error, "Tags could not be pushed to remote repository." if git.tags_push.failure?

        logger.debug "Local tag pushed: #{version}."
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
milestoner-16.2.1 lib/milestoner/tags/pusher.rb
milestoner-16.2.0 lib/milestoner/tags/pusher.rb
milestoner-16.1.0 lib/milestoner/tags/pusher.rb
milestoner-16.0.2 lib/milestoner/tags/pusher.rb
milestoner-16.0.1 lib/milestoner/tags/pusher.rb
milestoner-16.0.0 lib/milestoner/tags/pusher.rb
milestoner-15.3.0 lib/milestoner/tags/pusher.rb
milestoner-15.2.2 lib/milestoner/tags/pusher.rb
milestoner-15.2.1 lib/milestoner/tags/pusher.rb
milestoner-15.2.0 lib/milestoner/tags/pusher.rb
milestoner-15.1.0 lib/milestoner/tags/pusher.rb