@@ -52,14 +52,18 @@ task CleanEditorServices -If (Get-EditorServicesPath) {
5252# endregion
5353# region Build tasks
5454
55+ task DeleteEditorServices - If (Get-EditorServicesPath ) {
56+ Write-Host " `n ### Deleting Copy of PowerShellEditorServices`n " - ForegroundColor Green
57+ Remove-Item ./ modules - Recurse - Force - ErrorAction Ignore
58+ }
59+
5560task BuildEditorServices - If (Get-EditorServicesPath ) {
5661 Write-Host " `n ### Building PowerShellEditorServices`n " - ForegroundColor Green
5762 Invoke-Build Build (Get-EditorServicesPath )
5863}
5964
60- task LinkEditorServices - If (Get-EditorServicesPath ) BuildEditorServices, {
65+ task LinkEditorServices - If (Get-EditorServicesPath ) DeleteEditorServices , BuildEditorServices, {
6166 Write-Host " `n ### For developer use only! Creating symbolic link to PSES" - ForegroundColor Green
62- Remove-Item ./ modules - Recurse - Force - ErrorAction Ignore
6367 New-Item - ItemType SymbolicLink - Path ./ modules - Target " $ ( Split-Path (Get-EditorServicesPath )) /module"
6468}
6569
@@ -97,7 +101,6 @@ task TestEditorServices -If (Get-EditorServicesPath) {
97101}
98102
99103# endregion
100-
101104# region Package tasks
102105
103106task UpdateReadme - If { $script :IsPreviewExtension } {
@@ -116,7 +119,12 @@ task UpdateReadme -If { $script:IsPreviewExtension } {
116119 }
117120}
118121
119- task Package UpdateReadme, Build, {
122+ task Release UpdateReadme, DeleteEditorServices, CopyEditorServices, Restore, {
123+ Write-Host " `n ### Building release of vscode-powershell" - ForegroundColor Green
124+ exec { & npm run release }
125+ }
126+
127+ task Package Release, {
120128 assert (Test-Path ./ modules/ PowerShellEditorServices)
121129 assert ((Get-Item ./ modules).LinkType -ne " SymbolicLink" ) " Packaging requires a copy of PSES, not a symlink!"
122130
0 commit comments