Skip to content

Commit 790e6e2

Browse files
add temp task to build a v2 version of the extension & updates version of vscode-languageclient (WIP) (#1350)
* add temp task to build a v2 version of the extension * fix ci failure * fix path
1 parent 6c96a2d commit 790e6e2

File tree

4 files changed

+66
-46
lines changed

4 files changed

+66
-46
lines changed

package-lock.json

+25-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publisher": "ms-vscode",
66
"description": "Develop PowerShell scripts in Visual Studio Code!",
77
"engines": {
8-
"vscode": "^1.19.0"
8+
"vscode": "^1.22.0"
99
},
1010
"license": "SEE LICENSE IN LICENSE.txt",
1111
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
@@ -38,7 +38,7 @@
3838
],
3939
"dependencies": {
4040
"vscode": "^1.1.18",
41-
"vscode-languageclient": "^4.1.4"
41+
"vscode-languageclient": "^4.2.1"
4242
},
4343
"devDependencies": {
4444
"@types/mocha": "^2.2.32",

src/features/NewFileOrProject.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ export class NewFileOrProjectFeature implements IFeature {
9797

9898
if (!includeInstalledModules) {
9999
templates =
100-
[{
100+
[({
101101
label: this.loadIcon,
102102
description: "Load additional templates from installed modules",
103103
template: undefined,
104-
}]
104+
} as ITemplateQuickPickItem)]
105105
.concat(templates);
106106
} else {
107107
templates =
108-
[{
108+
[({
109109
label: this.loadIcon,
110110
description: "Refresh template list",
111111
template: undefined,
112-
}]
112+
} as ITemplateQuickPickItem)]
113113
.concat(templates);
114114
}
115115

vscode-powershell.build.ps1

+35-1
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,44 @@ task Package {
119119
Move-Item -Force .\PowerShell-$($script:ExtensionVersion).vsix .\PowerShell-insiders.vsix
120120
}
121121

122+
task V2Process {
123+
# Throwing this in so that we can get v2 builds going. This should be refactored later.
124+
try {
125+
if (!$script:psesBuildScriptPath) {
126+
throw "PSES path required."
127+
}
128+
129+
# grab 2.0 PSRL bits
130+
Write-Host "`n### Grabbing 2.0 bits"
131+
Push-Location ..\PowerShellEditorServices
132+
git remote add patrick https://github.com/SeeminglyScience/PowerShellEditorServices.git
133+
git fetch --all
134+
git checkout integrate-psreadline-2
135+
Invoke-Build Build
136+
Pop-Location
137+
138+
Write-Host "`n### Copying PowerShellEditorServices module files" -ForegroundColor Green
139+
Copy-Item -Recurse -Force ..\PowerShellEditorServices\module\* .\modules
140+
141+
Write-Host "`n### Packaging PowerShell-insiders.vsix`n" -ForegroundColor Green
142+
exec { & node ./node_modules/vsce/out/vsce package }
143+
144+
# Change the package to have a static name for automation purposes
145+
Move-Item -Force .\PowerShell-$($script:ExtensionVersion).vsix .\PowerShell-v2-insiders.vsix
146+
}
147+
catch {
148+
Write-Host "tried to build v2 but failed because of: `n`n$_"
149+
}
150+
151+
}
152+
122153
task UploadArtifacts -If { $env:AppVeyor } {
123154

124155
Push-AppveyorArtifact .\PowerShell-insiders.vsix
156+
if (Test-Path .\PowerShell-v2-insiders.vsix) {
157+
Push-AppveyorArtifact .\PowerShell-v2-insiders.vsix
158+
}
125159
}
126160

127161
# The default task is to run the entire CI build
128-
task . GetExtensionVersion, CleanAll, BuildAll, Test, Package, UploadArtifacts
162+
task . GetExtensionVersion, CleanAll, BuildAll, Test, Package, V2Process, UploadArtifacts

0 commit comments

Comments
 (0)