Skip to content

Commit 57d0228

Browse files
change Clean logic and added Test
1 parent 756efc2 commit 57d0228

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

build.ps1

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#!/usr/bin/env pwsh
22
param(
3+
[Parameter()]
4+
[switch]
5+
$Bootstrap,
6+
37
[Parameter()]
48
[switch]
59
$Clean,
610

711
[Parameter()]
812
[switch]
9-
$BootstrapBuildEnv
13+
$Test
1014
)
1115

1216
$NeededTools = @{
@@ -69,7 +73,7 @@ function hasMissingTools () {
6973
return ((getMissingTools).Count -gt 0)
7074
}
7175

72-
if ($BootstrapBuildEnv) {
76+
if ($Bootstrap) {
7377
$string = "Here is what your environment is missing:`n"
7478
$missingTools = getMissingTools
7579
if (($missingTools).Count -eq 0) {
@@ -80,16 +84,16 @@ if ($BootstrapBuildEnv) {
8084
+ "https://github.com/powershell/PowerShellEditorServices#development"
8185
}
8286
Write-Host "`n$string`n"
83-
} elseif ($Clean) {
84-
if(hasMissingTools) {
85-
Write-Host "You are missing needed tools. Run './build.ps1 -BootstrapBuildEnv' to see what they are."
86-
} else {
87+
} elseif(hasMissingTools) {
88+
Write-Host "You are missing needed tools. Run './build.ps1 -Bootstrap' to see what they are."
89+
} else {
90+
if($Clean) {
8791
Invoke-Build Clean
8892
}
89-
} else {
90-
if(hasMissingTools) {
91-
Write-Host "You are missing needed tools. Run './build.ps1 -BootstrapBuildEnv' to see what they are."
92-
} else {
93-
Invoke-Build Build
93+
94+
Invoke-Build Build
95+
96+
if($Test) {
97+
Invoke-Build Test
9498
}
9599
}

0 commit comments

Comments
 (0)