lib/tasks/setup.rb in dev-2.1.67 vs lib/tasks/setup.rb in dev-2.1.68

- old
+ new

@@ -75,12 +75,16 @@ #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=IO.read(nuspec).scan(/<version>([\d.]+)([\w-]+)?<\/version>/)[0][1] - puts 'no pre-release tag' if tag.length==0 - puts "pre-release tag #{tag}" if tag.length > 0 + 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>" if(current_version != target_version) add_quiet "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>" \ No newline at end of file