Sha256: 4e3810f581b534aeca6faa7deb36e9b4d51846f8efe2daace7667cd25eb9d103
Contents?: true
Size: 651 Bytes
Versions: 13
Compression:
Stored size: 651 Bytes
Contents
# frozen_string_literal: true module Milestoner # Handles publishing of Git tags to remote repository. class Pusher def initialize git: Git::Kit.new @git = git end def push version version = Versionaire::Version version fail Errors::Git, "Remote repository not configured." unless git.remote? fail Errors::Git, "Remote tag exists: #{version}." if tag_exists? version return if git.push_tags.empty? fail Errors::Git, "Tags could not be pushed to remote repository." end private attr_reader :git, :version def tag_exists? version git.tag_remote? version end end end
Version data entries
13 entries across 13 versions & 1 rubygems