Class: Milestoner::Pusher
- Inherits:
-
Object
- Object
- Milestoner::Pusher
- Defined in:
- lib/milestoner/pusher.rb
Overview
Handles publishing of Git tags to remote repository.
Instance Method Summary collapse
-
#initialize(git: Git::Kit.new) ⇒ Pusher
constructor
A new instance of Pusher.
- #push(version) ⇒ Object
Constructor Details
Instance Method Details
#push(version) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/milestoner/pusher.rb', line 10 def push version version = Versionaire::Version version fail(Errors::Git, "Remote repository not configured.") unless git.remote? fail(Errors::Git, "Remote tag exists: #{version.label}.") if tag_exists?(version) return if git..empty? fail(Errors::Git, "Tags could not be pushed to remote repository.") end |