Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created June 5, 2012 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruprict/2878918 to your computer and use it in GitHub Desktop.
Save ruprict/2878918 to your computer and use it in GitHub Desktop.
require 'albacore'
require 'version_bumper'
Albacore.configure do |config|
config.mstest.command = "C:/Program\ Files\ (x86)/Microsoft Visual Studio 10.0/Common7/IDE/mstest.exe"
config.msbuild.targets = [ :Clean, :Build ]
end
task :default => [:msbuild, :mstest, :output]
desc "Builds the project using the MSBuild project files"
msbuild :msbuild => [:assemblyinfo] do |msb|
msb.properties = { :configuration => :Debug }
msb.solution = "AlbacoreDemo.sln"
end
desc "Runs the tests in the AlbacoreDemo.Tests project"
mstest :mstest => [:msbuild] do |mstest|
mstest.assemblies "AlbacoreDemo.Tests/bin/Debug/AlbacoreDemo.Tests.dll"
end
desc "Updates AssemblyInfo version number"
assemblyinfo :assemblyinfo do |asm|
asm.version = bumper_version.to_s
asm.file_version = bumper_version.to_s
asm.company_name = "ACME"
asm.product_name = "AlbacoreDemo"
asm.copyright = "Wile E. Coyote"
asm.output_file = "AlbacoreDemo/Properties/AssemblyInfo.cs"
end
desc "Prepares the files needed for deployment"
output :output do |out|
out.from 'AlbacoreDemo'
out.to 'deploy'
out.file 'Web.Debug.config', :as => 'Web.config'
out.file 'global.asax'
out.file 'favicon.ico'
['bin', 'content', 'images', 'scripts', 'views'].each do |d|
out.dir d
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment