init commit
This commit is contained in:
27
assets/rake/build.rb
Normal file
27
assets/rake/build.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace :build do
|
||||
# Build the solution
|
||||
msbuild :net_build do |b|
|
||||
b.verbosity = 'normal'
|
||||
b.solution = "StandardStack.sln"
|
||||
b.properties = { :Configuration => BUILD_CONFIG }
|
||||
end
|
||||
|
||||
xbuild :mon_build do |b|
|
||||
b.verbosity = 'normal'
|
||||
b.solution = "StandardStack.sln"
|
||||
b.properties = { :Configuration => BUILD_CONFIG }
|
||||
end
|
||||
|
||||
# Clean the solution
|
||||
msbuild :net_clean do |b|
|
||||
b.verbosity = 'normal'
|
||||
b.solution = "StandardStack.sln"
|
||||
b.targets = [:Clean]
|
||||
end
|
||||
|
||||
xbuild :mon_clean do |b|
|
||||
b.verbosity = 'normal'
|
||||
b.solution = 'StandardStack.sln'
|
||||
b.targets = [:Clean]
|
||||
end
|
||||
end
|
||||
9
assets/rake/files.rb
Normal file
9
assets/rake/files.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace :files do
|
||||
task :clean_artifacts do
|
||||
puts 'Deleting all build artifacts from src/**/bin and src/**/obj. Removing output directory.'
|
||||
|
||||
|
||||
FileUtils.rm_r Dir.glob("src/**/bin")
|
||||
FileUtils.rm_r Dir.glob("src/**/obj")
|
||||
end
|
||||
end
|
||||
9
assets/rake/test.rb
Normal file
9
assets/rake/test.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace :test do
|
||||
# Run unit tests with nunit
|
||||
nunit :unit_tests do |cmd|
|
||||
cmd.command = "#{NUNIT}/nunit-console.exe"
|
||||
cmd.assemblies = FileList[Dir.glob("src/*.UnitTest/bin/#{BUILD_CONFIG}/*UnitTest.dll")]
|
||||
#cmd.result_path = "output/tests"
|
||||
#cmd.no_logo
|
||||
end
|
||||
end
|
||||
33
assets/rake/tools.rb
Normal file
33
assets/rake/tools.rb
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace :tools do
|
||||
|
||||
# If we don't have a copy of nuget, download it
|
||||
task :nuget_bootstrap do
|
||||
puts 'Ensuring NuGet exists in tools/NuGet'
|
||||
|
||||
if !FileTest.exist?("#{NUGET}/nuget.exe")
|
||||
puts 'Downloading nuget from nuget.org'
|
||||
|
||||
FileUtils.mkdir_p("#{NUGET}")
|
||||
File.open("#{NUGET}/nuget.exe", "wb") do |file|
|
||||
file.write open('http://nuget.org/nuget.exe').read
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Fetch nuget dependencies for all packages
|
||||
task :nuget_fetch => :nuget_bootstrap do
|
||||
|
||||
# If we aren't running under windows, assume we're using mono
|
||||
CMD_PREFIX = ""
|
||||
if !OS.windows?
|
||||
CMD_PREFIX = "mono"
|
||||
end
|
||||
|
||||
# Make sure we get solution-level deps
|
||||
sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i .nuget/packages.config -o packages"
|
||||
|
||||
FileList["**/packages.config"].each { |filepath|
|
||||
sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i #{filepath} -o packages"
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user