public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.