lib/tasks/setup.rb in dev-2.1.68 vs lib/tasks/setup.rb in dev-2.1.69
- old
+ new
@@ -75,19 +75,20 @@
#puts "updating nuspec files for VERSION #{VERSION}" if env.debug?
Dir.glob('*.nuspec').each{|nuspec|
#current_version=IO.read(nuspec).scan(/<version>[\d.\w]+<\/version>/)[0]
current_version=IO.read(nuspec).scan(/<version>([\d.]+)([\w-]+)?<\/version>/)[0]
if(!current_version.nil?)
+ tag=''
if(current_version.length > 1)
tag=IO.read(nuspec).scan(/<version>([\d.]+)([\w-]+)?<\/version>/)[0][1]
puts "pre-release tag #{tag}"
else
puts 'no pre-release tag'
end
puts "#{nuspec} current version=#{current_version}" if env.debug?
if(current_version.include?('<version>'))
- target_version="<version>#{VERSION}</version>"
+ target_version="<version>#{VERSION}#{tag}</version>"
if(current_version != target_version)
add_quiet "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>"
end
end
end
\ No newline at end of file