Class: Rake::ShipitTask::Step::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/shipit.rb

Instance Method Summary collapse

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

#prepareObject



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

#runObject



205
206
207
# File 'lib/shipit.rb', line 205

def run
	@vc.tag_version(@vers, @msg)
end