@@ -15,12 +15,12 @@ Function Build()
15
15
16
16
$clean = $msbuild + " src\nzbdrone.sln /t:Clean /m"
17
17
$build = $msbuild + " src\nzbdrone.sln /p:Configuration=Release /p:Platform=x86 /t:Build /m"
18
-
18
+
19
19
if (Test-Path $outputFolder )
20
20
{
21
21
Remove-Item - Recurse - Force $outputFolder - ErrorAction Continue
22
22
}
23
-
23
+
24
24
Invoke-Expression $clean
25
25
CheckExitCode
26
26
@@ -34,7 +34,7 @@ Function Build()
34
34
Write-Host " Removing Mono.Posix.dll"
35
35
Remove-Item " $outputFolder \Mono.Posix.dll"
36
36
37
- Write-Host " ##teamcity[progressFinish 'Build']"
37
+ Write-Host " ##teamcity[progressFinish 'Build']"
38
38
}
39
39
40
40
Function CleanFolder ($path , $keepConfigFiles )
@@ -56,12 +56,12 @@ Function CleanFolder($path, $keepConfigFiles)
56
56
}
57
57
58
58
get-childitem $path - File - Filter * .transform - Recurse | foreach ($_ ) {remove-item $_.fullname }
59
-
59
+
60
60
if ($keepConfigFiles -ne $true )
61
61
{
62
62
get-childitem $path - File - Filter * .dll.config - Recurse | foreach ($_ ) {remove-item $_.fullname }
63
63
}
64
-
64
+
65
65
Write-Host Removing FluentValidation.Resources files
66
66
get-childitem $path - File - Filter FluentValidation.resources.dll - recurse | foreach ($_ ) {remove-item $_.fullname }
67
67
@@ -72,15 +72,15 @@ Function CleanFolder($path, $keepConfigFiles)
72
72
73
73
Write-Host Removing vshost files
74
74
get-childitem $path - File - Filter * .vshost.exe - Recurse | foreach ($_ ) {remove-item $_.fullname }
75
-
75
+
76
76
if (Test-Path $$ path\NuGet)
77
77
{
78
78
Write-Host Removing NuGet
79
79
Remove-Item - Recurse - Force " $path \NuGet"
80
80
}
81
-
81
+
82
82
Write-Host Removing Empty folders
83
- while (Get-ChildItem $path - recurse | where {! @ (Get-ChildItem - force $_.fullname )} | Test-Path )
83
+ while (Get-ChildItem $path - recurse | where {! @ (Get-ChildItem - force $_.fullname )} | Test-Path )
84
84
{
85
85
Get-ChildItem $path - Directory - recurse | where {! @ (Get-ChildItem - force $_.fullname )} | Remove-Item
86
86
}
@@ -109,7 +109,7 @@ Function PackageMono()
109
109
Write-Host Removing Service helpers
110
110
get-childitem $outputFolderMono - File - Filter ServiceUninstall.* - Recurse | foreach ($_ ) {remove-item $_.fullname }
111
111
get-childitem $outputFolderMono - File - Filter ServiceInstall.* - Recurse | foreach ($_ ) {remove-item $_.fullname }
112
-
112
+
113
113
Write-Host Removing native windows binaries Sqlite, MediaInfo
114
114
get-childitem $outputFolderMono - File - Filter sqlite3.* - Recurse | foreach ($_ ) {remove-item $_.fullname }
115
115
get-childitem $outputFolderMono - File - Filter MediaInfo.* - Recurse | foreach ($_ ) {remove-item $_.fullname }
@@ -169,7 +169,7 @@ Function PackageOsxApp()
169
169
}
170
170
171
171
Copy-Item .\osx\Sonarr.app $outputFolderOsxApp \Sonarr.app - recurse
172
- Copy-Item $outputFolderOsx \ * $outputFolderOsxApp \Sonarr.app\Contents\MacOS - recurse
172
+ Copy-Item $outputFolderOsx $outputFolderOsxApp \Sonarr.app\Contents\MacOS - recurse
173
173
174
174
Write-Host " ##teamcity[progressFinish 'Creating OS X App Package']"
175
175
}
@@ -186,27 +186,27 @@ Function PackageTests()
186
186
187
187
Write-Host Packaging Tests
188
188
Write-Host " ##teamcity[progressStart 'Creating Test Package']"
189
-
189
+
190
190
if (Test-Path $testPackageFolder )
191
191
{
192
192
Remove-Item - Recurse - Force $testPackageFolder - ErrorAction Continue
193
193
}
194
194
195
- Get-ChildItem - Recurse - Directory | Where-Object {$_.FullName -like $testSearchPattern } | foreach ($_ ){
195
+ Get-ChildItem - Recurse - Directory | Where-Object {$_.FullName -like $testSearchPattern } | foreach ($_ ){
196
196
Copy-Item - Recurse ($_.FullName + " \*" ) $testPackageFolder - ErrorAction Ignore
197
197
}
198
198
199
- .\src\.nuget\NuGet.exe install NUnit.Runners - Version 2.6 .1 - Output $testPackageFolder
199
+ .\src\.nuget\NuGet.exe install NUnit.Runners - Version 2.6 .1 - Output $testPackageFolder
200
200
201
201
Copy-Item $outputFolder \* .dll - Destination $testPackageFolder - Force
202
202
Copy-Item $outputFolder \* .pdb - Destination $testPackageFolder - Force
203
203
Copy-Item .\* .sh - Destination $testPackageFolder - Force
204
-
204
+
205
205
Write-Host Creating MDBs for tests
206
206
get-childitem $testPackageFolder - File - Include @ (" *.exe" , " *.dll" ) - Exclude @ (" MediaInfo.dll" , " sqlite3.dll" ) - Recurse | foreach ($_ ) {
207
207
Write-Host " Creating .mdb for $_ "
208
208
& " tools\pdb2mdb\pdb2mdb.exe" $_.fullname
209
- }
209
+ }
210
210
211
211
get-childitem $testPackageFolder - File - Filter * log.config | foreach ($_ ) {remove-item $_.fullname }
212
212
@@ -224,7 +224,7 @@ Function RunGulp()
224
224
$gulpPath = ' .\node_modules\gulp\bin\gulp'
225
225
Invoke-Expression ' npm install'
226
226
CheckExitCode
227
-
227
+
228
228
Invoke-Expression (' node ' + $gulpPath + ' build' ) - ErrorAction Continue - Verbose
229
229
CheckExitCode
230
230
0 commit comments