lib/tasks/setup.rb in dev-2.0.167 vs lib/tasks/setup.rb in dev-2.0.168
- old
+ new
@@ -48,31 +48,26 @@
end
}
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]
-
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]
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}'%>"
+ add "<%Text.replace_in_file('#{assemblyInfo}','#{current_version}','#{target_version}')%>"
end
end
}
end
end
\ No newline at end of file