class Milestoner::Tags::Pusher
Handles publishing of tags to a remote repository.
Public Instance Methods
Source
# File lib/milestoner/tags/pusher.rb, line 12 def call version check_remote_repo(version).bind { check_remote_tag version } .bind { push version } end
Private Instance Methods
Source
# File lib/milestoner/tags/pusher.rb, line 19 def check_remote_repo version git.origin? ? Success(version) : Failure("Remote repository not configured.") end
Source
# File lib/milestoner/tags/pusher.rb, line 23 def check_remote_tag version git.tag_remote?(version) ? Failure("Remote tag exists: #{version}.") : Success(version) end
Source
# File lib/milestoner/tags/pusher.rb, line 33 def debug version logger.debug { "Local tag pushed: #{version}." } Success version end
Source
# File lib/milestoner/tags/pusher.rb, line 27 def push version git.tags_push .either proc { debug version }, proc { Failure "Tags could not be pushed to remote repository." } end