Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
Forked from jcbozonier/gist:364773
Created April 25, 2011 21:34
Show Gist options
  • Save ChrisMcKee/941286 to your computer and use it in GitHub Desktop.
Save ChrisMcKee/941286 to your computer and use it in GitHub Desktop.
require 'rake'
require 'albacore'
build_dir = "../build"
bin_dir = "#{build_dir}/bin"
src_dir = "../src"
solution = "#{src_dir}/Example.sln"
release_dir = "#{build_dir}/release"
package_dir = "#{build_dir}/package"
task :default => :test
desc "Compile solution"
msbuild :compile do |msbuild|
msbuild.solution = solution
end
desc "Run all tests"
nunit :test => :compile do |nunit|
nunit.path_to_command = "C:/Program Files (x86)/NUnit 2.5.1/bin/net-2.0/nunit-console.exe"
nunit.assemblies "#{bin_dir}/Test.dll"
end
task :release_tree => [:test, release_dir] do
cp "#{bin_dir}/Production.dll", release_dir
mkdir package_dir
end
directory release_dir
desc "Erase all generated files"
task :clean do
rm_rf build_dir
rm_rf package_dir
end
desc "Build, test, and package the code."
task :release => :zip do
end
zip :zip => :release_tree do |zip|
zip.directories_to_zip "../build/release"
zip.output_file = 'release.zip'
zip.output_path = package_dir
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment