Skip to content

Commit f3fb28a

Browse files
committed
Fix Package task for updated release pipline
1 parent 50cf40c commit f3fb28a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

vscode-powershell.build.ps1

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Write-Host "`n### Extension Version: $($script:PackageJson.version) Extension Na
1414

1515
#region Utility tasks
1616

17+
# TODO: This needs to be a function, not a task.
1718
task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices, TestEditorServices, Package {
1819

1920
$script:psesRepoPath = `
@@ -24,7 +25,7 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices,
2425
"$PSScriptRoot/../PowerShellEditorServices/"
2526
}
2627

27-
if (!(Test-Path $script:psesRepoPath)) {
28+
if (!(Test-Path "$script:psesRepoPath/PowerShellEditorServices.build.ps1")) {
2829
# Clear the path so that it won't be used
2930
Write-Warning "`nThe PowerShellEditorServices repo cannot be found at path $script:psesRepoPath`n"
3031
$script:psesRepoPath = $null
@@ -172,14 +173,9 @@ task UpdatePackageJson {
172173
}
173174

174175
task Package UpdateReadme, {
175-
176-
if ($script:psesBuildScriptPath) {
176+
if ($script:psesBuildScriptPath -or $env:TF_BUILD) {
177177
Write-Host "`n### Copying PowerShellEditorServices module files" -ForegroundColor Green
178178
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
183179
} else {
184180
throw "Unable to find PowerShell EditorServices"
185181
}

0 commit comments

Comments
 (0)