@@ -7,4 +7,4 @@ sudo: false
|
|||||||
script:
|
script:
|
||||||
- gem install bundle
|
- gem install bundle
|
||||||
- bundle
|
- bundle
|
||||||
- rake preflight
|
- bundle exec rake preflight
|
||||||
|
|||||||
15
Rakefile
15
Rakefile
@@ -1,4 +1,3 @@
|
|||||||
require 'bundler/setup'
|
|
||||||
require 'rake/clean'
|
require 'rake/clean'
|
||||||
require 'albacore'
|
require 'albacore'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
@@ -21,11 +20,23 @@ task :build => [:compile]
|
|||||||
|
|
||||||
desc 'Run the tests'
|
desc 'Run the tests'
|
||||||
task :test => [:nunit]
|
task :test => [:nunit]
|
||||||
|
desc 'run Static analysis linters'
|
||||||
|
task :lint => [:build, :cs_lint]
|
||||||
|
|
||||||
desc 'Retrieve, Build, Test'
|
desc 'Retrieve, Build, Test'
|
||||||
task :preflight => [:retrieve, :build, :test, :cs_lint]
|
task :preflight => [:clean, :retrieve, :build, :test, :lint]
|
||||||
|
|
||||||
|
desc 'cleans up artifacts'
|
||||||
|
task :clean do
|
||||||
|
puts 'cleaning artifacts from directory'
|
||||||
|
FileUtils.rm_rf("output")
|
||||||
|
FileUtils.rm_rf("packages")
|
||||||
|
FileUtils.rm_rf("tools")
|
||||||
|
FileUtils.rm_rf(Dir.glob("src/**/*.dll"))
|
||||||
|
FileUtils.rm_rf(Dir.glob("src/**/*.pdb"))
|
||||||
|
FileUtils.rm_rf(Dir.glob("src/**/*.mdb"))
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
build :compile => ['tools:nuget_fetch'] do |b|
|
build :compile => ['tools:nuget_fetch'] do |b|
|
||||||
b.prop 'Configuration', Configuration
|
b.prop 'Configuration', Configuration
|
||||||
|
|||||||
@@ -7,10 +7,17 @@ namespace :tools do
|
|||||||
if !FileTest.exist?("#{NUGET}/nuget.exe")
|
if !FileTest.exist?("#{NUGET}/nuget.exe")
|
||||||
puts 'Downloading nuget from nuget.org'
|
puts 'Downloading nuget from nuget.org'
|
||||||
|
|
||||||
|
begin
|
||||||
FileUtils.mkdir_p("#{NUGET}")
|
FileUtils.mkdir_p("#{NUGET}")
|
||||||
File.open("#{NUGET}/nuget.exe", "wb") do |file|
|
File.open("#{NUGET}/nuget.exe", "wb") do |file|
|
||||||
file.write open('https://nuget.org/nuget.exe').read
|
file.write open('https://nuget.org/nuget.exe').read
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27,7 +34,7 @@ namespace :tools do
|
|||||||
end
|
end
|
||||||
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"
|
sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i .nuget/packages.config -o packages"
|
||||||
|
|
||||||
FileList["src/**/packages.config"].each { |filepath|
|
FileList["src/**/packages.config"].each { |filepath|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ dependencies:
|
|||||||
- sudo apt-get update; sudo apt-get install mono-devel
|
- sudo apt-get update; sudo apt-get install mono-devel
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
- rake preflight
|
- bundle exec rake preflight
|
||||||
|
|||||||
Reference in New Issue
Block a user