@@ -35,6 +35,17 @@ function Die-WithOutput($exitCode, $output) {
35
35
exit $exitCode
36
36
}
37
37
38
+ function Dump-Error ($output ) {
39
+ $exitCode = $LastExitCode
40
+
41
+ $errors = $output | Select-String " : error"
42
+ if ($errors ) {
43
+ $output = " Likely errors:" , $errors , " " , " Full output:" , $output
44
+ }
45
+
46
+ Die- WithOutput $exitCode $output
47
+ }
48
+
38
49
function Run-Command ([scriptblock ]$Command , [switch ]$Fatal , [switch ]$Quiet ) {
39
50
$output = " "
40
51
if ($Quiet ) {
@@ -81,16 +92,34 @@ else {
81
92
82
93
Write-Output " Building Octokit..."
83
94
Write-Output " "
84
- $output = .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=Default " " buildMode=Release"
95
+ $output = & .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=BuildApp " " buildMode=Release" 2>&1
85
96
if ($LastExitCode -ne 0 ) {
86
- $exitCode = $LastExitCode
97
+ Dump- Error($output )
98
+ }
87
99
88
- $errors = $output | Select-String " : error"
89
- if ($errors ) {
90
- $output = " Likely errors:" , $errors , " " , " Full output:" , $output
91
- }
100
+ Write-Output " Running unit tests..."
101
+ Write-Output " "
102
+ $output = & .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=UnitTests" " buildMode=Release" 2>&1
103
+ if ($LastExitCode -ne 0 ) {
104
+ Dump- Error($output )
105
+ }
92
106
93
- Die- WithOutput $exitCode $output
107
+ Write-Output " Running integration tests..."
108
+ Write-Output " "
109
+ $output = & .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=IntegrationTests" " buildMode=Release" 2>&1
110
+ if ($LastExitCode -ne 0 ) {
111
+ Dump- Error($output )
112
+ }
113
+
114
+ Write-Output " Creating NuGet packages..."
115
+ Write-Output " "
116
+ $output = & .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=CreateOctokitPackage" " buildMode=Release" 2>&1
117
+ if ($LastExitCode -ne 0 ) {
118
+ Dump- Error($output )
119
+ }
120
+ $output = & .\tools\FAKE.Core\tools\Fake.exe " build.fsx" " target=CreateOctokitReactivePackage" " buildMode=Release" 2>&1
121
+ if ($LastExitCode -ne 0 ) {
122
+ Dump- Error($output )
94
123
}
95
124
96
125
$exitCode = 0
0 commit comments