lib/tasks/setup.rb in dev-2.0.165 vs lib/tasks/setup.rb in dev-2.0.166
- old
+ new
@@ -50,21 +50,25 @@
end
if(defined?(VERSION))
#Text.replace_in_file('HelloLibrary.nuspec',/<version>[\d.]+<\/version>/,"<version>#{VERSION}</version>")
Dir.glob('*.nuspec').each{|nuspec|
+
#published_version = `gem list -r #{spec.name}`.scan(/\((\d+.\d+.\d+)\)/)[0][0]
current_version=IO.read(nuspec).scan(/<version>[\d.]+<\/version>/)[0][0]
+
+ puts "#{nuspec} current version=#{current_version}" if defined?(DEBUG)
if(current_version.include?('<version>'))
target_version="<version>#{VERSION}</version>"
if(current_version != target_version)
add "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>"
end
end
#add "<%Text.replace_in_file('#{nuspec}',/<version>[\d.]+<\/version>/,'<version>#{VERSION}</version>%>'"
}
Dir.glob('**/AssemblyInfo.cs').each{|assemblyInfo|
current_version=IO.read(assemblyInfo).scan(/Version\(\"[\d.]+\"\)/)[0][0]
+ puts "#{assemblyInfo} current version=#{current_version}" if defined?(DEBUG)
if(current_version.include?('Version('))
target_version="Version(\"#{VERSION}\")"
if(current_version != target_version)
add "<%Text.replace_in_file('#{assemblyInfo}','#{current_version}','#{target_version}'%>"
end
\ No newline at end of file