@@ -52,14 +52,18 @@ task CleanEditorServices -If (Get-EditorServicesPath) {
52
52
# endregion
53
53
# region Build tasks
54
54
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
+
55
60
task BuildEditorServices - If (Get-EditorServicesPath ) {
56
61
Write-Host " `n ### Building PowerShellEditorServices`n " - ForegroundColor Green
57
62
Invoke-Build Build (Get-EditorServicesPath )
58
63
}
59
64
60
- task LinkEditorServices - If (Get-EditorServicesPath ) BuildEditorServices, {
65
+ task LinkEditorServices - If (Get-EditorServicesPath ) DeleteEditorServices , BuildEditorServices, {
61
66
Write-Host " `n ### For developer use only! Creating symbolic link to PSES" - ForegroundColor Green
62
- Remove-Item ./ modules - Recurse - Force - ErrorAction Ignore
63
67
New-Item - ItemType SymbolicLink - Path ./ modules - Target " $ ( Split-Path (Get-EditorServicesPath )) /module"
64
68
}
65
69
@@ -97,7 +101,6 @@ task TestEditorServices -If (Get-EditorServicesPath) {
97
101
}
98
102
99
103
# endregion
100
-
101
104
# region Package tasks
102
105
103
106
task UpdateReadme - If { $script :IsPreviewExtension } {
@@ -116,7 +119,12 @@ task UpdateReadme -If { $script:IsPreviewExtension } {
116
119
}
117
120
}
118
121
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, {
120
128
assert (Test-Path ./ modules/ PowerShellEditorServices)
121
129
assert ((Get-Item ./ modules).LinkType -ne " SymbolicLink" ) " Packaging requires a copy of PSES, not a symlink!"
122
130
0 commit comments