lib/tasks/setup.rb in dev-2.1.65 vs lib/tasks/setup.rb in dev-2.1.66

- old
+ new

@@ -72,15 +72,21 @@ end if(defined?(VERSION)) #puts "updating nuspec files for VERSION #{VERSION}" if env.debug? Dir.glob('*.nuspec').each{|nuspec| - current_version=IO.read(nuspec).scan(/<version>[\d.]+<\/version>/)[0] - puts "#{nuspec} current version=#{current_version}" if env.debug? - if(current_version.include?('<version>')) - target_version="<version>#{VERSION}</version>" - if(current_version != target_version) - add_quiet "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>" + #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=IO.read(nuspec).scan(/<version>([\d.]+)([\w-]+)?<\/version>/)[0][1] + puts 'no pre-release tag' if tag.nil? || tag.length==0 + puts "pre-release tag #{tag}" if !tag.nil && tag.length > 0 + puts "#{nuspec} current version=#{current_version}" if env.debug? + if(current_version.include?('<version>')) + target_version="<version>#{VERSION}</version>" + if(current_version != target_version) + add_quiet "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>" + end end end } Dir.glob('**/AssemblyInfo.cs').each{|assemblyInfo| current_version=IO.read(assemblyInfo).scan(/Version\(\"[\d.]+\"\)/)[0] \ No newline at end of file