Merge pull request #48 from tparnell8/fixRake

fix rake file
This commit is contained in:
Tommy Parnell
2015-09-05 12:16:06 -04:00

View File

@@ -1,5 +1,8 @@
require 'openssl'
namespace :tools do
# If we don't have a copy of nuget, download it
# If we don't have a copy of nuget, download it
task :nuget_bootstrap do
puts 'Ensuring NuGet exists in tools/NuGet'
@@ -10,12 +13,12 @@ namespace :tools do
begin
FileUtils.mkdir_p("#{NUGET}")
File.open("#{NUGET}/nuget.exe", "wb") do |file|
file.write open('https://nuget.org/nuget.exe').read
file.write open('http://nuget.org/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read
end
rescue
FileUtils.rm_rf("#{NUGET}/nuget.exe")
File.open("#{NUGET}/nuget.exe", "wb") do |file|
file.write open('http://nuget.org/nuget.exe').read
file.write open('https://nuget.org/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read
end
end
end