Skip to content

Commit cc10b91

Browse files
rjmholtTylerLeonhardt
authored andcommitted
Add PSReadLine installation to build script
1 parent 6a3f7c9 commit cc10b91

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

PowerShellEditorServices.build.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,25 @@ task RestorePsesModules -After Build {
309309

310310
Save-Module @splatParameters
311311
}
312+
313+
# TODO: Replace this with adding a new module to Save when a new PSReadLine release comes out to the Gallery
314+
if (-not (Test-Path $PSScriptRoot/module/PSReadLine))
315+
{
316+
Write-Host "`tInstalling module: PSReadLine"
317+
318+
# Download AppVeyor zip
319+
$jobId = (Invoke-RestMethod https://ci.appveyor.com/api/projects/lzybkr/PSReadLine).build.jobs[0].jobId
320+
Invoke-RestMethod https://ci.appveyor.com/api/buildjobs/$jobId/artifacts/bin%2FRelease%2FPSReadLine.zip -OutFile $PSScriptRoot/module/PSRL
321+
322+
# Position PSReadLine
323+
Expand-Archive $PSScriptRoot/module/PSRL.zip $PSScriptRoot/module/PSRL
324+
Move-Item $PSScriptRoot/module/PSRL/PSReadLine $PSScriptRoot/module
325+
326+
# Clean up
327+
Remove-Item -Force -Recurse $PSScriptRoot/module/PSRL.zip
328+
Remove-Item -Force -Recurse $PSScriptRoot/module/PSRL
329+
}
330+
312331
Write-Host "`n"
313332
}
314333

0 commit comments

Comments
 (0)