-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile.rb
91 lines (72 loc) · 3 KB
/
Rakefile.rb
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
require 'rake'
require 'albacore'
#______________________________________________________________________________
#---------------------------------SETTINGS-------------------------------------
# set up the build script folder so we can pull in shared rake scripts.
# This should be the same for most projects, but if your project is a level
# deeper in the repo you will need to add another ..
bs = File.dirname(__FILE__)
bs = File.join(bs, "..") if bs.index("branches") != nil
bs = File.join(bs, "../../../HabaneroCommunity/BuildScripts")
$buildscriptpath = File.expand_path(bs)
$:.unshift($buildscriptpath) unless
$:.include?(bs) || $:.include?($buildscriptpath)
#------------------------build settings--------------------------
require 'rake-settings.rb'
msbuild_settings = {
:properties => {:configuration => :release},
:targets => [:clean, :rebuild],
:verbosity => :quiet,
#:use => :net35 ;uncomment to use .net 3.5 - default is 4.0
}
#------------------------dependency settings---------------------
$habanero_version = 'trunk'
require 'rake-habanero.rb'
$smooth_version = 'trunk'
require 'rake-smooth.rb'
#------------------------project settings------------------------
$basepath = 'http://delicious:8080/svn/habanero/HabaneroCommunity/Habanero.Linq/trunk'
$solution = "source/Habanero.Linq - 2010.sln"
#______________________________________________________________________________
#---------------------------------TASKS----------------------------------------
desc "Runs the build all task"
task :default => [:build_all]
desc "Rakes habanero+smooth, builds Faces"
task :build_all => [:create_temp, :rake_habanero, :rake_smooth, :build, :delete_temp]
desc "Builds Faces, including tests"
task :build => [:clean, :updatelib, :msbuild, :test, :commitlib]
#------------------------build Faces --------------------
desc "Cleans the bin folder"
task :clean do
puts cyan("Cleaning bin folder")
FileUtils.rm_rf 'bin'
end
svn :update_lib_from_svn do |s|
s.parameters "update lib"
end
task :updatelib => :update_lib_from_svn do
puts cyan("Updating lib")
FileUtils.cp Dir.glob('temp/bin/Habanero.Base.dll'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.Base.pdb'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.Base.xml'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.BO.dll'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.BO.pdb'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.BO.xml'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.Smooth.dll'), 'lib'
FileUtils.cp Dir.glob('temp/bin/Habanero.Smooth.pdb'), 'lib'
end
desc "Builds the solution with msbuild"
msbuild :msbuild do |msb|
puts cyan("Building #{$solution} with msbuild")
msb.update_attributes msbuild_settings
msb.solution = $solution
end
desc "Runs the tests"
nunit :test do |nunit|
puts cyan("Running tests")
nunit.assemblies 'bin\Habanero.Linq.Tests.dll'
end
svn :commitlib do |s|
puts cyan("Commiting lib")
s.parameters "ci lib -m autocheckin"
end