Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (62 sloc) 2.305 kB
COMPILE_TARGET = "debug"
$LOAD_PATH.unshift(File.dirname(__FILE__))
require "build_support/BuildUtils.rb"
include FileTest
require 'rubygems'
require 'zip/zip'
require 'zip/zipfilesystem'
RESULTS_DIR = "results"
BUILD_NUMBER = "1.0.0."
PRODUCT = "SuitSystem"
COPYRIGHT = 'Copyright 2009 McCreary, Veselka, Bragg & Allen, P.C. All rights reserved.';
COMMON_ASSEMBLY_INFO = 'src/CommonAssemblyInfo.cs';
CLR_VERSION = "v3.5"
versionNumber = ENV["BUILD_NUMBER"].nil? ? 0 : ENV["BUILD_NUMBER"]
props = { :archive => "dist" }
desc "Compiles, unit tests"
task :all => [:default]
desc "**Default**, compiles and runs tests"
task :default => [:compile, :test] do
puts "Build Succeeded"
end
desc "Displays a list of tasks"
task :help do
taskHash = Hash[*(`rake.cmd -T`.split(/\n/).collect { |l| l.match(/rake (\S+)\s+\#\s(.+)/).to_a }.collect { |l| [l[1], l[2]] }).flatten]
indent = " "
puts "rake #{indent}#Runs the 'default' task"
taskHash.each_pair do |key, value|
if key.nil?
next
end
puts "rake #{key}#{indent.slice(0, indent.length - key.length)}##{value}"
end
end
desc "Update the version information for the build"
task :version do
builder = AsmInfoBuilder.new(BUILD_NUMBER, {'Product' => PRODUCT, 'Copyright' => COPYRIGHT})
buildNumber = builder.buildnumber
puts "The build number is #{buildNumber}"
builder.write COMMON_ASSEMBLY_INFO
end
desc "Prepares the working directory for a new build"
task :clean do
#TODO: do any other tasks required to clean/prepare the working directory
Dir.mkdir props[:archive] unless exists?(props[:archive])
end
desc "Compiles the app"
task :compile => [:clean, :version] do
MSBuildRunner.compile :compilemode => COMPILE_TARGET, :solutionfile => 'src/NHibernateHbmToFluent.sln', :clrversion => CLR_VERSION
outDir = "src/WinForm/bin/#{COMPILE_TARGET}"
Dir.glob(File.join(outDir, "*.{dll,pdb,exe}")){|file|
copy(file, props[:archive]) if File.file?(file)
}
end
desc "Runs unit tests"
task :test => [:unit_test]
desc "Runs tests"
task :unit_test => :compile do
runner = NUnitRunner.new :compilemode => COMPILE_TARGET, :source => 'src', :platform => 'x86'
runner.executeTests ['ConverterTests']
end
desc "Target used for the CI server"
task :ci => [:unit_test]
Jump to Line
Something went wrong with that request. Please try again.