vendor/gems/BlueCloth-1.0.0/utils.rb
### Using the CVS log for the given <tt>file</tt> attempt to guess what the
### next release version might be. This only works if releases are tagged
### with tags like 'RELEASE_x_y'.
Using the CVS log for the given file attempt to guess what the
next release version might be. This only works if releases are tagged
with tags like 'RELEASE_x_y'.
Using the CVS log for the given file attempt to guess what the next release version might be . This only works if releases are tagged with tags like ' RELEASE_x_y ' .
def extractNextVersionFromTags( file )
		message "Attempting to extract next release version from CVS tags for #{file}...\n"
		raise RuntimeError, "No such file '#{file}'" unless File.exists?( file )
		cvsPath = findProgram( 'cvs' ) or
			raise RuntimeError, "Cannot find the 'cvs' program. Aborting."
		output = %x{#{cvsPath} log #{file}}
		release = [ 0, 0 ]
		output.scan( /RELEASE_(\d+)_(\d+)/ ) {|match|
			if $1.to_i > release[0] || $2.to_i > release[1]
				release = [ $1.to_i, $2.to_i ]
				replaceMessage( "Found %d.%02d...\n" % release )
			end
		}
		if release[1] >= 99
			release[0] += 1
			release[1] = 1
		else
			release[1] += 1
		end
		return "%d.%02d" % release
	end
def extractNextVersionFromTags ( file ) message "Attempting to extract next release version from CVS tags for #{file}...\n" raise RuntimeError , "No such file '#{file}'" unless File . exists? ( file ) cvsPath = findProgram ( 'cvs' ) or raise RuntimeError , "Cannot find the 'cvs' program. Aborting." output = %x{ #{ cvsPath }  log  #{ file } } release = [ 0 , 0 ] output . scan ( / RELEASE_( \d +)_( \d +) / ) { | match | if $1 . to_i > release [ 0 ] || $2 . to_i > release [ 1 ] release = [ $1 . to_i , $2 . to_i ] replaceMessage ( "Found %d.%02d...\n" % release ) end } if release [ 1 ] >= 99 release [ 0 ] += 1 release [ 1 ] = 1 else release [ 1 ] += 1 end return "%d.%02d" % release end
Using the CVS log for the given <tt>file</tt> attempt to guess what the
next release version might be.
Using the CVS log for the given <tt > file< / tt > attempt to guess what the next release version might be .
file
<not_specific>