forked from JeremySkinner/FluentLinqToSql
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.boo
84 lines (67 loc) · 2.88 KB
/
build.boo
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
configuration = "release"
test_assembly = "src/FluentLinqToSql.Tests/bin/${configuration}/FluentLinqToSql.Tests.dll"
dbtest_assembly = "src/FluentLinqToSql.DatabaseTests/bin/${configuration}/FluentLinqToSql.DatabaseTests.dll"
artest_assembly = "src/FluentLinqToSql.Tests.ActiveRecord/bin/${configuration}/FluentLinqToSql.Tests.ActiveRecord.dll"
dbtest_enabled = true
target default, (init, compile, test, createDb, dbTest, deploy, package):
pass
target ci, (init, compile, createDb, coverage, deploy, package):
pass
target init:
rmdir("build")
target noDatabase:
dbtest_enabled = false
target compile:
msbuild(file: "FluentLinqToSql.sln", configuration: "release")
target test:
nunit(toolPath: "lib/nunit/nunit-console-x86.exe", assemblies: (test_assembly, artest_assembly))
target createDb:
if not dbtest_enabled:
print "Skipping database creation"
return
print "Trying to create test db"
nunit(assembly: dbtest_assembly, include: "CreateDatabase")
#exec("lib/Tarantino/DatabaseDeployer.exe", "Rebuild (local) FluentLinqToSql db")
print "Test database created"
target dbTest:
if not dbtest_enabled:
print "Skipping database tests"
return
nunit(assembly: dbtest_assembly)
target deploy:
with FileList():
.Include("src/FluentLinqToSql/bin/${configuration}/*.{dll,pdb,xml}")
.Include("readme.txt")
.Include("License.txt")
.Flatten(true)
.ForEach def(file):
file.CopyToDirectory("build/${configuration}")
target package:
zip("build/${configuration}", "build/FluentLinqToSql.zip")
target coverage:
ncover_path = "c:/program files (x86)/ncover"
app_assemblies = ("FluentLinqToSql",)
teamcity_launcher = env("teamcity.dotnet.nunitlauncher")
#ensure the other test assemblies are in the right place...
System.IO.File.Copy(dbtest_assembly, "src/FluentLinqToSql.Tests/bin/${configuration}/FluentLinqToSql.DatabaseTests.dll", true)
with FileList("src/FluentLinqToSql.Tests.ActiveRecord/bin/${configuration}"):
.Include("FluentLinqToSql.Tests.ActiveRecord.dll")
.Include("*.config")
.Include("Schema.sql")
.Flatten(true)
.ForEach def(file):
file.CopyToDirectory("src/FluentLinqToSql.Tests/bin/${configuration}")
with ncover():
.toolPath = "${ncover_path}/NCover.console.exe"
.reportDirectory = "build/Coverage"
.workingDirectory = "src/FluentLinqToSql.Tests/bin/${configuration}"
.applicationAssemblies = app_assemblies
.program = "${teamcity_launcher} v2.0 x86 NUnit-2.4.6"
.testAssembly = "FluentLinqToSql.Tests.dll;FluentLinqToSql.DatabaseTests.dll;FluentLinqToSql.Tests.ActiveRecord.dll"
.excludeAttributes = "System.Runtime.CompilerServices.CompilerGeneratedAttribute"
with ncover_explorer():
.toolPath = "${ncover_path}/NCoverExplorer.console.exe"
.project = "FluentLinqToSql"
.reportDirectory = "build/coverage"
target foo:
print System.IO.FileInfo(".").FullName