Last active
December 12, 2015 12:38
-
-
Save squidge/4773560 to your computer and use it in GitHub Desktop.
compiling .net and running unit tests with rake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'albacore' | |
require 'rake/clean' | |
CONFIGURATION = 'Release' | |
BUILD_DIR = File.expand_path('binaries/') | |
XUNIT_COMMAND = 'xunit/xunitmono.sh' | |
CLEAN.include(FileList[File.join(BUILD_DIR, '*')]) | |
desc "Compiles solution" | |
task :build do | |
puts "#{BUILD_DIR}" | |
solution = 'dinners.sln' | |
sh "xbuild /property:OutDir=#{BUILD_DIR}/ #{solution}" | |
end | |
desc "Runs all tests" | |
task :test do | |
assemblies = all_assemblies() | |
assemblies.each do |assembly| | |
sh "#{XUNIT_COMMAND} #{assembly}" | |
end | |
end | |
task :default => [:clean, :build, :test] | |
def all_assemblies | |
assemblies = File.join(BUILD_DIR, '*.*.tests.*.dll') | |
FileList[assemblies] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment