forked from MartinLRodrigues/NRules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
122 lines (116 loc) · 2.6 KB
/
build.ps1
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
param (
[string]$target = 'Build',
[string]$component_name = 'Core'
)
$product_version = '0.4'
$build_number = '2'
$target_framework = 'net-4.0'
$configuration = 'Release'
$version = "$product_version.$build_number"
$components = @{
'NRules' = @{
name = 'NRules'
test = @{
include = @('*Tests.dll')
}
merge = @{
include = @('NRules*.dll')
exclude = @('**Tests.dll')
attr_file = 'NRules.dll'
out_file = 'NRules.dll'
}
bin = @{
merge_include = @('NRules.*')
}
package = @{
nuget = @{
id = 'NRules'
include = @('NRules.*')
}
}
help = 'NRules.shfbproj'
};
'NRules.Debugger.Visualizer' = @{
name = 'NRules.Debugger.Visualizer'
bin = @{
out_include = @('*.dll','*.pdb','*.xml')
out_exclude = @('**Tests**','nunit**','Moq**')
}
package = @{
zip = @{
name = "NRules.Debugger.Visualizer.$version.zip"
}
}
};
'NRules.Integration.Autofac' = @{
name = 'NRules.Integration.Autofac'
src_root = 'src/NRules.Integration'
bin = @{
out_include = @('*.dll','*.pdb','*.xml')
out_exclude = @('**Tests**','nunit**','Moq**')
}
package = @{
nuget = @{
id = 'NRules.Integration.Autofac'
include = @('NRules.Integration.Autofac.*')
}
}
};
'NRules.Integration' = @{
name = 'NRules.Integration'
nobuild = $true
help = 'NRules.Integration.shfbproj'
};
'Samples.SimpleRules' = @{
name = 'SimpleRules'
src_root = 'samples'
bin = @{
out_include = @('*.*')
}
};
'Samples.MissManners' = @{
name = 'MissManners'
src_root = 'samples'
bin = @{
out_include = @('*.*')
}
};
'Samples.RuleBuilder' = @{
name = 'RuleBuilder'
src_root = 'samples'
bin = @{
out_include = @('*.*')
}
};
'Samples.ClaimsAdjudication' = @{
name = 'ClaimsAdjudication'
src_root = 'samples'
bin = @{
out_include = @('*.*')
}
};
}
$core = @('NRules', 'NRules.Debugger.Visualizer')
$integration = $components.keys | where { $_.StartsWith("NRules.Integration") }
$samples = $components.keys | where { $_.StartsWith("Samples.") }
$component_list = @()
if ($component_name -eq "Core") {
$component_list += $core
} elseif ($component_name -eq "Integration") {
$component_list += $integration
} elseif ($component_name -eq "Samples") {
$component_list += $samples
} elseif ($component_name -eq "All") {
$component_list += $core
$component_list += $integration
$component_list += $samples
} else {
$component_list += $component_name
}
Import-Module .\tools\build\psake.psm1
$component_list | % {
Invoke-psake .\default.ps1 $target -properties @{version=$version} -parameters @{component=$components[$_]}
if (-not $psake.build_success) {
break
}
}