diff --git a/Rakefile.rb b/Rakefile.rb index 4a80a01..db88679 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -70,8 +70,8 @@ desc 'publish nugets' task :nuspec_publish do PROJECTS.each{|dir| Dir.chdir(dir) do - sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first}" + sh "#{NUGET_EXE} push -Source https://api.nuget.org/v3/index.json #{FileList["*.nupkg"].first}" end } - sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first}" + sh "#{NUGET_EXE} push -Source https://api.nuget.org/v3/index.json #{FileList["*.nupkg"].first}" end diff --git a/nuget.rake b/nuget.rake index 4d2588f..da0549c 100644 --- a/nuget.rake +++ b/nuget.rake @@ -10,12 +10,12 @@ namespace :nuget do begin FileUtils.mkdir_p("#{NUGET}") File.open("#{NUGET}/nuget.exe", "wb") do |file| - file.write open('http://nuget.org/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read + file.write open('https://dist.nuget.org/win-x86-commandline/latest/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('https://dist.nuget.org/win-x86-commandline/v3.2.0/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read + file.write open('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read end end end