@@ -14,6 +14,7 @@ Write-Host "`n### Extension Version: $($script:PackageJson.version) Extension Na
14
14
15
15
# region Utility tasks
16
16
17
+ # TODO: This needs to be a function, not a task.
17
18
task ResolveEditorServicesPath - Before CleanEditorServices, BuildEditorServices, TestEditorServices, Package {
18
19
19
20
$script :psesRepoPath = `
@@ -24,7 +25,7 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices,
24
25
" $PSScriptRoot /../PowerShellEditorServices/"
25
26
}
26
27
27
- if (! (Test-Path $script :psesRepoPath )) {
28
+ if (! (Test-Path " $script :psesRepoPath /PowerShellEditorServices.build.ps1 " )) {
28
29
# Clear the path so that it won't be used
29
30
Write-Warning " `n The PowerShellEditorServices repo cannot be found at path $script :psesRepoPath `n "
30
31
$script :psesRepoPath = $null
@@ -172,14 +173,9 @@ task UpdatePackageJson {
172
173
}
173
174
174
175
task Package UpdateReadme, {
175
-
176
- if ($script :psesBuildScriptPath ) {
176
+ if ($script :psesBuildScriptPath -or $env: TF_BUILD ) {
177
177
Write-Host " `n ### Copying PowerShellEditorServices module files" - ForegroundColor Green
178
178
Copy-Item - Recurse - Force ..\PowerShellEditorServices\module\* .\modules
179
- } elseif (Test-Path .\PowerShellEditorServices) {
180
- Write-Host " `n ### Moving PowerShellEditorServices module files" - ForegroundColor Green
181
- Move-Item - Force .\PowerShellEditorServices\* .\modules
182
- Remove-Item - Force .\PowerShellEditorServices
183
179
} else {
184
180
throw " Unable to find PowerShell EditorServices"
185
181
}
0 commit comments