forked from condep/ConDep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.ps1
More file actions
174 lines (155 loc) · 7.67 KB
/
default.ps1
File metadata and controls
174 lines (155 loc) · 7.67 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
properties {
$pwd = Split-Path $psake.build_script_file
$build_directory = "$pwd\Build"
$tools_directory = "$pwd\tools"
$version = "1.0.0.0"
$configuration = "Debug"
$condep = "ConDep"
$condep_dsl = "ConDep.Dsl"
$condep_console = "ConDep.Console"
$condep_remote = "ConDep.Remote"
$condep_dsl_lb_arr = "ConDep.Dsl.LoadBalancer.Arr"
$condep_dsl_lb_ace = "ConDep.Dsl.LoadBalancer.Ace"
$condep_dsl_tests = "ConDep.Dsl.Tests"
$condep_webq_tests = "ConDep.WebQ.Tests"
$condep_web_q_server = "ConDep.WebQ.Server"
$condep_web_q_client = "ConDep.WebQ.Client"
$lib = "$pwd\lib"
$preString = "-rc"
$releaseNotes = "Pre-release"
}
include .\tools\psake_ext.ps1
task default -depends Build-All
task ci -depends Build-All
task Build-All -depends Init, Build-ConDep-Dsl, Build-ConDep-Console, Build-ConDep-Dsl-LB-ARR, Build-ConDep-Dsl-LB-ACE, Build-Tests
task Build-ConDep-Dsl -depends Clean-ConDep-Dsl, Init {
Exec { msbuild "$pwd\$condep_dsl\$condep_dsl.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_dsl\ }
Generate-Nuspec-File `
-file "$build_directory\$condep_dsl.nuspec" `
-version $nugetVersion `
-preString $preString `
-id "$condep_dsl" `
-title "$condep_dsl" `
-licenseUrl "http://www.con-dep.net/license/" `
-projectUrl "http://www.con-dep.net/" `
-description "Note: This package is for extending the ConDep DSL. If you're looking for ConDep to do deployment or infrastructure as code, please use the ConDep package. ConDep is a highly extendable Domain Specific Language for Continuous Deployment, Continuous Delivery and Infrastructure as Code on Windows." `
-iconUrl "https://raw.github.com/torresdal/ConDep/master/images/ConDepNugetLogo.png" `
-releaseNotes "$releaseNotes" `
-tags "Continuous Deployment Delivery Infrastructure WebDeploy Deploy msdeploy IIS automation powershell remote" `
-dependencies @(
@{ Name="log4net"; Version="2.0.0"}
) `
-files @(
@{ Path="$condep_dsl\$condep_dsl.dll"; Target="lib/net40"},
@{ Path="$condep_dsl\$condep_dsl.xml"; Target="lib/net40"}
) `
-frameworkAssemblies @(
@{ Name="Microsoft.Web.Deployment"; Target="net40"},
@{ Name="Microsoft.Web.Delegation"; Target="net40"}
)
}
task Build-ConDep-Console -depends Clean-ConDep-Console, Init {
Exec { msbuild "$pwd\$condep_console\$condep_console.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_console\ }
Generate-Nuspec-File `
-file "$build_directory\$condep.nuspec" `
-version $nugetVersion `
-preString $preString `
-id "$condep" `
-title "$condep" `
-licenseUrl "http://www.con-dep.net/license/" `
-projectUrl "http://www.con-dep.net/" `
-description "ConDep is a highly extendable Domain Specific Language for Continuous Deployment, Continuous Delivery and Infrastructure as Code on Windows." `
-iconUrl "https://raw.github.com/torresdal/ConDep/master/images/ConDepNugetLogo.png" `
-releaseNotes "$releaseNotes" `
-tags "Continuous Deployment Delivery Infrastructure WebDeploy Deploy msdeploy IIS automation powershell remote" `
-dependencies @(
@{ Name="$condep_dsl"; Version="$nugetVersion$preString"},
@{ Name="NDesk.Options"; Version="0.2.1"}
@{ Name="log4net"; Version="2.0.0"}
) `
-files @(
@{ Path="$condep_console\$condep.exe"; Target="lib/net40"},
@{ Path="$condep_console\$condep_remote.dll"; Target="lib/net40"},
@{ Path="$condep_console\$condep_web_q_client.dll"; Target="lib/net40"},
@{ Path="$condep_console\ConDep.WebQ.Data.dll"; Target="lib/net40"},
@{ Path="$lib\SlowCheetah\v2.4\SlowCheetah.Tasks.dll"; Target="lib/net40"}
)
}
task Build-ConDep-Dsl-LB-ARR -depends Clean-ConDep-Dsl-LB-ARR, Init {
Exec { msbuild "$pwd\$condep_dsl_lb_arr\$condep_dsl_lb_arr.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_dsl_lb_arr\ }
Generate-Nuspec-File `
-file "$build_directory\$condep_dsl_lb_arr.nuspec" `
-version $nugetVersion `
-preString $preString `
-id "$condep_dsl_lb_arr" `
-title "$condep_dsl_lb_arr" `
-licenseUrl "http://www.con-dep.net/license/" `
-projectUrl "http://www.con-dep.net/" `
-description "ConDep is a highly extendable Domain Specific Language for Continuous Deployment, Continuous Delivery and Infrastructure as Code on Windows." `
-iconUrl "https://raw.github.com/torresdal/ConDep/master/images/ConDepNugetLogo.png" `
-releaseNotes "$releaseNotes" `
-tags "Continuous Deployment Delivery Infrastructure WebDeploy Deploy msdeploy IIS automation powershell remote" `
-dependencies @(
@{ Name="$condep_dsl"; Version="$nugetVersion$preString"},
@{ Name="ArrLoadBalancerCmdlet"; Version="1.0.2"}
) `
-files @(@{ Path="$condep_dsl_lb_arr\$condep_dsl_lb_arr.dll"; Target="lib/net40"} )
}
task Build-ConDep-Dsl-LB-ACE -depends Clean-ConDep-Dsl-LB-ACE, Init {
Exec { msbuild "$pwd\$condep_dsl_lb_ace\$condep_dsl_lb_ace.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_dsl_lb_ace\ }
Generate-Nuspec-File `
-file "$build_directory\$condep_dsl_lb_ace.nuspec" `
-version $nugetVersion `
-preString $preString `
-id "$condep_dsl_lb_ace" `
-title "$condep_dsl_lb_ace" `
-licenseUrl "http://www.con-dep.net/license/" `
-projectUrl "http://www.con-dep.net/" `
-description "ConDep is a highly extendable Domain Specific Language for Continuous Deployment, Continuous Delivery and Infrastructure as Code on Windows." `
-iconUrl "https://raw.github.com/torresdal/ConDep/master/images/ConDepNugetLogo.png" `
-releaseNotes "$releaseNotes" `
-tags "Continuous Deployment Delivery Infrastructure WebDeploy Deploy msdeploy IIS automation powershell remote" `
-dependencies @(
@{ Name="$condep_dsl"; Version="$nugetVersion$preString"}
) `
-files @(@{ Path="$condep_dsl_lb_ace\$condep_dsl_lb_ace.dll"; Target="lib/net40"} )
}
task Build-Tests -depends Clean-Tests, Init {
Exec { msbuild "$pwd\$condep_dsl_tests\$condep_dsl_tests.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_dsl_tests\ }
Exec { msbuild "$pwd\$condep_webq_tests\$condep_webq_tests.csproj" /t:Build /p:Configuration=$configuration /p:OutDir=$build_directory\$condep_webq_tests\ }
}
task Init {
$script:nugetVersion = $version.Substring(0, $version.LastIndexOf("."))
Generate-Assembly-Info `
-file "$pwd\AssemblyVersionInfo.cs" `
-company "ConDep" `
-product "ConDep $version" `
-copyright "Copyright © ConDep 2012" `
-version $version `
-clsCompliant "true"
if ((Test-Path $build_directory) -eq $false) {
New-Item $build_directory -ItemType Directory
}
}
task Clean-ConDep-Dsl {
Write-Host "Cleaning Build output" -ForegroundColor Green
Remove-Item $build_directory\$condep_dsl -Force -Recurse -ErrorAction SilentlyContinue
}
task Clean-ConDep-Console {
Write-Host "Cleaning Build output" -ForegroundColor Green
Remove-Item $build_directory\$condep_console -Force -Recurse -ErrorAction SilentlyContinue
}
task Clean-ConDep-Dsl-LB-ARR {
Write-Host "Cleaning Build output" -ForegroundColor Green
Remove-Item $build_directory\$condep_dsl_lb_arr -Force -Recurse -ErrorAction SilentlyContinue
}
task Clean-ConDep-Dsl-LB-ACE {
Write-Host "Cleaning Build output" -ForegroundColor Green
Remove-Item $build_directory\$condep_dsl_lb_ace -Force -Recurse -ErrorAction SilentlyContinue
}
task Clean-Tests {
Write-Host "Cleaning Build output" -ForegroundColor Green
Remove-Item $build_directory\$condep_dsl_tests -Force -Recurse -ErrorAction SilentlyContinue
Remove-Item $build_directory\$condep_webq_tests -Force -Recurse -ErrorAction SilentlyContinue
}