Permalink
Browse files

Adding copy task to rakefile

  • Loading branch information...
1 parent 7e52f89 commit 456e3da837d9606f5df3257fd0567fdd19440e76 @digitalBush committed Dec 8, 2011
Showing with 14 additions and 3 deletions.
  1. +14 −3 rakefile.rb
View
@@ -15,7 +15,7 @@
task :default => :all
-task :all => [:clean,:dependencies,:build,:specs]
+task :all => [:clean,:dependencies,:build,:specs,:copy]
task :clean do
rmtree BUILD_PATH
@@ -44,14 +44,25 @@
end
end
-msbuild :build do |msb|
+msbuild :build=>[:dependencies] do |msb|
msb.properties :configuration => configuration
msb.targets :Clean, :Build
msb.verbosity = "minimal"
msb.solution = "#{PRODUCT_NAME}.sln"
end
-mspec :specs do |mspec|
+mspec :specs => [:build] do |mspec|
mspec.command = "lib/Machine.Specifications/tools/mspec-clr4.exe"
mspec.assemblies Dir.glob('specs/**/*Specs.dll')
+end
+
+task :copy => [:specs] do
+ Dir.glob("src/**/*.csproj") do |proj|
+ name=File.basename(proj,".csproj")
+ puts "Copying output for #{name}"
+ src=File.dirname(proj)
+ dest = "#{BUILD_PATH}/#{name}/"
+ mkdir_p(dest)
+ cp_r("#{src}/bin/#{configuration}/.",dest)
+ end
end

0 comments on commit 456e3da

Please sign in to comment.