if we cannot https we must http for nuget
This commit is contained in:
7
Rakefile
7
Rakefile
@@ -20,9 +20,11 @@ task :build => [:compile]
|
||||
|
||||
desc 'Run the tests'
|
||||
task :test => [:nunit]
|
||||
desc 'run Static analysis linters'
|
||||
task :lint => [:build, :cs_lint]
|
||||
|
||||
desc 'Retrieve, Build, Test'
|
||||
task :preflight => [:clean, :retrieve, :build, :test, :cs_lint]
|
||||
task :preflight => [:clean, :retrieve, :build, :test, :lint]
|
||||
|
||||
desc 'cleans up artifacts'
|
||||
task :clean do
|
||||
@@ -46,8 +48,7 @@ test_runner :nunit do |tests|
|
||||
tests.exe = "packages/NUnit.Runners.2.6.4/tools/nunit-console.exe" # executable to run tests with
|
||||
end
|
||||
|
||||
desc 'run static analysis'
|
||||
task :cs_lint => :build do
|
||||
task :cs_lint do
|
||||
|
||||
unless Dir.exists?('output')
|
||||
Dir.mkdir('output')
|
||||
|
||||
@@ -7,10 +7,17 @@ namespace :tools do
|
||||
if !FileTest.exist?("#{NUGET}/nuget.exe")
|
||||
puts 'Downloading nuget from nuget.org'
|
||||
|
||||
begin
|
||||
FileUtils.mkdir_p("#{NUGET}")
|
||||
File.open("#{NUGET}/nuget.exe", "wb") do |file|
|
||||
file.write open('https://nuget.org/nuget.exe').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
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +34,7 @@ namespace :tools do
|
||||
end
|
||||
end
|
||||
|
||||
# Make sure we get solution-level deps
|
||||
# Make sure we get solution-level deps
|
||||
sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i .nuget/packages.config -o packages"
|
||||
|
||||
FileList["src/**/packages.config"].each { |filepath|
|
||||
|
||||
Reference in New Issue
Block a user