Class: Rake::ShipitTask::Step::Tag
- Inherits:
-
Object
- Object
- Rake::ShipitTask::Step::Tag
- Defined in:
- lib/shipit.rb
Instance Method Summary collapse
-
#initialize(step, format = "%s") ⇒ Tag
constructor
A new instance of Tag.
- #prepare ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(step, format = "%s") ⇒ Tag
Returns a new instance of Tag.
191 192 193 |
# File 'lib/shipit.rb', line 191 def initialize(step, format="%s") @format = format end |
Instance Method Details
#prepare ⇒ Object
195 196 197 198 199 200 201 202 203 |
# File 'lib/shipit.rb', line 195 def prepare @vc = Rake::ShipitTask::VC.new @vers = @format % VERS @msg = "Release %s" % @vers puts "tag: #{@vers}" if @vc.exists_tagged_version(@vers) raise "#{@tag} is already exists" end end |
#run ⇒ Object
205 206 207 |
# File 'lib/shipit.rb', line 205 def run @vc.tag_version(@vers, @msg) end |